]> git.eshelyaron.com Git - emacs.git/commit
rx performance improvements
authorMattias Engdegård <mattiase@acm.org>
Sun, 30 Jul 2023 19:53:06 +0000 (21:53 +0200)
committerMattias Engdegård <mattiase@acm.org>
Wed, 2 Aug 2023 16:28:23 +0000 (18:28 +0200)
commitd167888c5b7740af3300ee363c5121519dada0a2
treea41574f41ae8c1376c50d950c6f7f60f952a4b4e
parentcda4396ade14aae126b06d7ea559fc0fcb4324fe
rx performance improvements

* lisp/emacs-lisp/rx.el (rx--generate-alt):
Treat the intervals and classes lists separately without joining,
to reduce allocation.  Handle special cases first.
(rx--union-intervals):
Implement directly instead of using intersection and complement.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Adapt test, as some
character alternatives are now slightly different.
(rx--complement-intervals, rx--union-intervals)
(rx--intersect-intervals): New unit tests.
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el