]> git.eshelyaron.com Git - emacs.git/commit
Faster non-destructive list sorting
authorMattias EngdegÄrd <mattiase@acm.org>
Fri, 22 Mar 2024 10:54:09 +0000 (11:54 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 29 Mar 2024 12:33:34 +0000 (13:33 +0100)
commit4c237ac597f886bf6cb7b5950594780e4b7fd576
tree04ffa12ff37be9923ff0ce4ebccb68f5aa1c8a44
parentbbe8ce0d6f1ffd0e03091cbfa4171090104e2690
Faster non-destructive list sorting

Postpone the creation of a new list to after sorting which turns out to
be a lot faster (1.1x - 1.5x speedup).

* src/fns.c (sort_list, sort_vector, Fsort):
Create the new list when moving the data out from the temporary array.

(cherry picked from commit 45941a62c799f9685fae296079304ae0898920cc)
src/fns.c