Subject: Re: bug#63225: Compiling regexp patterns (and REGEXP_CACHE_SIZE in search.c)

From: Mattias Engdegård <[email-masked]>
Date: Wed, 3 May 2023 17:20:52 +0200

3 maj 2023 kl. 17.05 skrev Ihor Radchenko <[email-masked]>:

> (cond ((looking-at-p ...) ...)) gives
> 
> misses: 1493570
> hits: 3225203
> % misses from total: 31%
> 
> giant rx + looking-at gives
> 
> misses: 1177242
> hits: 3233553
> % misses from total: 27%

Maybe you should instrument the regexp engine and log the pattern and whether compilation was needed to a file. Run on a reduced dataset, and see if the sequence of regexps being exercised, and their frequencies, are consistent with what you expect.