]> git.eshelyaron.com Git - emacs.git/commit
Speed up string-lessp for multibyte strings
authorMattias Engdegård <mattiase@acm.org>
Thu, 6 Oct 2022 15:46:02 +0000 (17:46 +0200)
committerMattias Engdegård <mattiase@acm.org>
Fri, 7 Oct 2022 11:57:54 +0000 (13:57 +0200)
commitdef6fa4246502befa174aa6409166b0967621f7b
tree42ec7fa50fc85593ac2357e1da445099b3b691b0
parent6b4c17dec06b7cac4025317daef68c302c61d4e6
Speed up string-lessp for multibyte strings

Improve comparison speed when both arguments are multibyte strings,
at least one of them containing a non-ASCII character.  (All-ASCII
multibyte strings are already fast.)
The speed-up is about 2× for strings of 10 chars, 10× for strings of
100 chars.

* src/fns.c (Fstring_lessp): Quickly skip the common prefix by
comparing words.
src/fns.c