[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] add compiled regexp primitive lisp object
From: |
Björn Bidar |
Subject: |
Re: [PATCH] add compiled regexp primitive lisp object |
Date: |
Tue, 24 Dec 2024 23:16:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> 2. They could maybe even be constructed from Elisp, opening
>>> opportunities for custom regexp compilers that can be tailored to
>>> specific application needs rather than having to stick to hard-coded
>>> generic tradeoffs Emacs has to do without knowing the purpose of a
>>> regexp.
>>
>> How will this help making matching faster, and why does this have to
>> be via compiled regexp objects?
>
> My motivation is
> https://burntsushi.net/regex-internals/#literal-extraction that explains
> how regexp compilation depends on certain heuristics.
>
> For example, when searching for "\\(foo\\|bar\\)[a-z]+", heuristics
> invoking simple string literal search for "foo" and "bar" first before
> using heavy regexp automata is justified. Not so much when the prefix is
> simply " " that usually occurs very frequently in text.
I want to highlight that is example would already cover many of the
operations which modes do for example for fontification or
text-extraction.
- Re: [PATCH] add compiled regexp primitive lisp object, (continued)
- Re: [PATCH] add compiled regexp primitive lisp object, Ihor Radchenko, 2024/12/22
- Re: [PATCH] add compiled regexp primitive lisp object, Eli Zaretskii, 2024/12/22
- Re: [PATCH] add compiled regexp primitive lisp object, Ihor Radchenko, 2024/12/22
- Re: [PATCH] add compiled regexp primitive lisp object, Eli Zaretskii, 2024/12/22
- Re: [PATCH] add compiled regexp primitive lisp object, Ihor Radchenko, 2024/12/22
- Re: [PATCH] add compiled regexp primitive lisp object, Björn Bidar, 2024/12/23
- Message not available
- Re: [PATCH] add compiled regexp primitive lisp object, Ihor Radchenko, 2024/12/23
- Re: [PATCH] add compiled regexp primitive lisp object, Eli Zaretskii, 2024/12/23
- Re: [PATCH] add compiled regexp primitive lisp object, Ihor Radchenko, 2024/12/23
- Re: [PATCH] add compiled regexp primitive lisp object,
Björn Bidar <=
- Re: [PATCH] add compiled regexp primitive lisp object, Stefan Monnier, 2024/12/24
- Re: [PATCH] add compiled regexp primitive lisp object, Ihor Radchenko, 2024/12/24
- Re: [PATCH] add compiled regexp primitive lisp object, Stefan Monnier, 2024/12/24