emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 4b79c80c999 1/2: New function 'sort-on'


From: Michael Heerdegen
Subject: Re: master 4b79c80c999 1/2: New function 'sort-on'
Date: Mon, 04 Mar 2024 07:45:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Dmitry Gutov <dmitry@gutov.dev> writes:

> Well, 'mapcar' in it allocates a new sequence of length N. The
> Schwartz transform creates about as many new cons cells too. If the
> function is made destructive, 'mapcar' becomes unnecessary as the
> original sequence could be reused - and that is measurably faster, too
> (when the cost function is simple enough).
>
> And if it's made destructive, it becomes even closer to the current
> 'sort'. That would mean less justification to keep them as separate
> functions.

This sounds reasonable to me.


> > BTW, I wonder how this addition fits into my original suggestion about
> > sort predicate construction.
>
> Sorry, I either can't find your respective message in this thread, or
> don't understand the suggestion.

See my original message "Add a function for building sort predicates"
from 02/01 in this year.  It's about refactoring and providing a
convenient way to create kinds of sort predicates that are needed often
in practice, like tabulated-list-mode's sorting column sorting.

Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]