]> git.eshelyaron.com Git - emacs.git/commit
; Minor improvements to timsort
authorAndrew G Cohen <cohen@andy.bu.edu>
Wed, 16 Mar 2022 14:06:49 +0000 (22:06 +0800)
committerAndrew G Cohen <cohen@andy.bu.edu>
Wed, 16 Mar 2022 14:14:24 +0000 (22:14 +0800)
commit9edfa27f9604f197ce47d86dc9ec07f14bfb7dde
treebdc611f77c0491856f569a13316f19af9815bdeb
parente0470bcec76b94f93aed796abdcab14e2086fffc
; Minor improvements to timsort

* src/fns.c (sort_list, sort_vector): Improve documentation and
variable names.
(merge): Replace function inorder with direct use of call2.
* src/lisp.h: Remove inorder prototype.
* src/sort.c:
(struct reloc): Document the order field.
(inorder): Uppercase INLINE.
(binarysort): Move type declaration.
(needmem): New INLINE function.
(merge_lo, merge_hi): Use it.
(merge_getmem): Remove unnecessary if.
(tim_sort): Remove unnecessary if.
(reverse_vector): Shift instead of integer divide by 2.
src/fns.c
src/lisp.h
src/sort.c