Stefan Monnier
16fc5b6c0c
pcase.el (\`): Try and handle large patterns better
...
Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that. See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html
* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.
2024-06-03 13:40:39 -04:00
..
2023-10-21 12:25:25 +02:00
2024-01-29 14:50:45 +02:00
2024-04-13 10:52:55 +03:00
2024-01-02 10:28:14 +08:00
2024-06-03 13:40:39 -04:00
2024-01-02 09:47:10 +08:00
2024-05-27 16:47:24 -07:00
2024-05-29 19:33:13 -07:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-04-20 11:07:51 +02:00
2024-02-07 11:13:56 -05:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-05-29 18:29:52 +02:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-06-01 17:47:57 +03:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-05-07 15:50:03 +02:00
2024-04-18 13:04:13 +03:00
2024-05-18 13:30:45 +03:00
2024-04-24 11:45:31 +08:00
2024-02-23 13:02:27 +01:00
2024-05-08 20:36:37 -07:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-05-20 09:22:41 +03:00
2024-01-02 09:47:10 +08:00
2024-02-07 11:11:38 -05:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-05-19 11:14:56 +03:00
2024-01-02 09:47:10 +08:00
2024-04-20 14:32:00 +03:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-20 11:40:22 +02:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-06-03 12:53:04 +02:00
2024-04-20 13:12:30 +02:00
2024-01-07 12:39:47 +01:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-05-28 20:53:25 -04:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-03-30 16:35:11 +03:00
2024-01-02 09:47:10 +08:00
2024-02-11 09:25:19 +02:00
2024-01-13 20:38:34 +02:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-04-27 12:28:42 +03:00
2024-06-02 08:59:16 +03:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-04-09 11:01:52 +03:00
2024-01-11 17:27:04 +02:00
2024-01-02 09:47:10 +08:00
2024-05-29 11:54:54 +02:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-05-01 13:08:30 +02:00
2024-01-02 09:47:10 +08:00
2024-02-23 13:02:27 +01:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:30:05 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-01-14 14:17:41 +01:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-03-11 15:23:55 +02:00
2024-01-02 09:47:10 +08:00
2024-05-13 12:39:41 +02:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-05-28 13:23:12 +02:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-05-20 13:24:11 -07:00
2024-01-02 10:28:14 +08:00
2024-01-02 10:28:14 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:30:05 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 10:28:14 +08:00
2024-04-18 15:35:49 +02:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00
2024-01-02 09:47:10 +08:00