]> git.eshelyaron.com Git - emacs.git/commit
Faster `string-lessp` for unibyte arguments
authorMattias Engdegård <mattiase@acm.org>
Wed, 16 Mar 2022 14:17:19 +0000 (15:17 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 4 Apr 2022 07:49:31 +0000 (09:49 +0200)
commit16ee9fa138817c061d00cf9a59d2b3f559eebfe1
tree7c3530dca438a692ece9ec9062931ac6da939c7a
parent85fb2341f82d2ba687cefd21ec84d46d06834f57
Faster `string-lessp` for unibyte arguments

Since this function is commonly used as a sorting predicate
where it is time-critical, this is a useful optimisation.

* src/fns.c (Fstring_lessp): Add fast path for the common case
when both arguments are unibyte.
* test/src/fns-tests.el (fns-tests--string-lessp-cases)
(fns-tests-string-lessp): New test.
src/fns.c
test/src/fns-tests.el