]> git.eshelyaron.com Git - emacs.git/commit
Speed up `seq-subseq` for lists (bug#56521)
authorMattias Engdegård <mattiase@acm.org>
Mon, 18 Jul 2022 09:32:22 +0000 (11:32 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 18 Jul 2022 10:49:29 +0000 (12:49 +0200)
commit6f7941272b112f0412479ffc315352d7928e0fdf
tree2a97d3b6d5d61d5a893f91a6c46bae46fcb656db
parent5ad8f3e5709a3823371ea6aa039b5e7e50feca1f
Speed up `seq-subseq` for lists (bug#56521)

* lisp/emacs-lisp/seq.el (seq-subseq):
Make faster by using `take` instead of a lisp loop,
and more importantly by not front-loading the error text formatting.
* test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref)
(test-seq-subseq): Test `seq-subseq` for lists more thoroughly.
lisp/emacs-lisp/seq.el
test/lisp/emacs-lisp/seq-tests.el