GNU bug report logs - #63225
Compiling regexp patterns (and REGEXP_CACHE_SIZE in search.c)

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 2 May 2023 07:35:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 63225 <at> debbugs.gnu.org
Subject: bug#63225: Compiling regexp patterns (and REGEXP_CACHE_SIZE in search.c)
Date: Wed, 3 May 2023 15:59:29 +0200
3 maj 2023 kl. 11.36 skrev Ihor Radchenko <yantar92 <at> posteo.net>:

> Yet, in my tests, I am unable to see any improvement when I consolidate
> the regexps.

That's odd, but do you get a better cache hit rate (assuming a cache size of 20)?

> The version with giant single rx form is actually slower overall (!),
> making no difference at all in `org-element--current-element'.

Can't say what's going on here, really. Normally a combined regexp shouldn't be slower. Are you sure you get the same parse?

> Ideally, the compiler should do something similar to
> what https://www.colm.net/open-source/ragel/ does.

Yes, constructing a DFA would be more realistic when it's less in danger of being thrown away at any time.





This bug report was last modified 2 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.