diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-28 00:06:00 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-28 00:06:00 -0400 |
commit | f1fe13ea057237f5426c93876488cb95be86156c (patch) | |
tree | 2fbdc9d4d5f69cefbb423171fd9dc8af25d2bdb4 /lisp/emacs-lisp/cl-preloaded.el | |
parent | 1552f8345d8cbea282d171bffe5a22e330eeed37 (diff) | |
download | emacs-f1fe13ea057237f5426c93876488cb95be86156c.tar.gz emacs-f1fe13ea057237f5426c93876488cb95be86156c.tar.bz2 emacs-f1fe13ea057237f5426c93876488cb95be86156c.zip |
(pcase-mutually-exclusive): Use auto-generated table
The `pcase-mutually-exclusive-predicates` table was not very
efficient since it grew like O(N²) with the number of
predicates. Replace it with an O(N) table that's auto-generated
from the `built-in-class` objects.
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Delete variable.
(pcase--subtype-bitsets): New function and constant.
(pcase--mutually-exclusive-p): Use them.
* lisp/emacs-lisp/cl-preloaded.el (built-in-class): Don't inline.
Diffstat (limited to 'lisp/emacs-lisp/cl-preloaded.el')
-rw-r--r-- | lisp/emacs-lisp/cl-preloaded.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index 260478c3a39..d23ad3972a9 100644 --- a/lisp/emacs-lisp/cl-preloaded.el +++ b/lisp/emacs-lisp/cl-preloaded.el @@ -303,6 +303,7 @@ (cl-defstruct (built-in-class (:include cl--class) + (:noinline t) (:constructor nil) (:constructor built-in-class--make (name docstring parents)) (:copier nil)) |