]> git.eshelyaron.com Git - emacs.git/commit
Safer and faster string sorting
authorMattias EngdegÄrd <mattiase@acm.org>
Sun, 12 May 2024 09:22:23 +0000 (11:22 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 12 May 2024 15:49:42 +0000 (17:49 +0200)
commit45e04484357737ef225a4cff8ee6a8de68cb36c6
tree1306a59fadb0ded36a0495caaf9e62caee02b6fd
parentb229481b4562d97326f16b4c7905c33b78b95b50
Safer and faster string sorting

* lisp/emacs-lisp/cl-seq.el (cl-sort):
Don't use string mutation when sorting the characters in a string.
This avoids O(n^2) run time and makes it future-safe.

(cherry picked from commit 38091e43bee991920db81263fe56da444a123fae)
lisp/emacs-lisp/cl-seq.el