emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add compiled regexp primitive lisp object


From: Eli Zaretskii
Subject: Re: [PATCH] add compiled regexp primitive lisp object
Date: Mon, 23 Dec 2024 18:49:06 +0200

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: monnier@iro.umontreal.ca, mattiase@acm.org, arstoffel@gmail.com,
>  eller.helmut@gmail.com, dmcc2@hypnicjerk.ai, pipcet@protonmail.com,
>  emacs-devel@gnu.org, acorallo@gnu.org, stefankangas@gmail.com
> Date: Mon, 23 Dec 2024 16:33:49 +0000
> 
> Having compiler regexp object exposed to Elisp would open the
> following extra opportunities:
> 
> 1. They could be inspected from Elisp, and hopefully optimized
>    better. For now, there is simply no way to detect which parts of
>    regexps are slow and which are not.

If we can optimize them from Lisp, we should be able to do the same in
C.  If you explain what kind of optimization opportunities you had in
mind, we could discuss how to implement that.  In any case, adding
APIs for regexp optimizations doesn't require to have compiled regexp
objects.

> 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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]