Subject: Re: bug#54608: 29.0.50; xref-search-program-alist: support ugrep

From: Dmitry Gutov <[email-masked]>
Date: Mon, 28 Mar 2022 18:02:42 +0300

On 28.03.2022 17:37, Manuel Uberti wrote:
> On 28/03/22 14:57, Dmitry Gutov wrote:
>> Does ugrep show better performance in this use case than grep on your 
>> machine?
> 
> With ugrep running `M-: (benchmark 100 (project-find-regexp 
> "setq-default"))` in the directory containg Emacs source code returns:
> 
> Elapsed time: 0.003903s
> 
> With regular grep I get:
> 
> Elapsed time: 0.026032s (0.022015s in 1 GCs)

0.026032s (0.022015s in 1 GCs) implies the total runtime sans GC

takes 0.026 - 0.022 = 0.004, which is pretty much the same as what you 
measured for ugrep (0.0039). The the choice of search program is 
unlikely to affect the GC time. It probably occurred randomly.

You might want to try doing a search in a larger project, for a 
relatively unique string (which has less than 100 matches, say). Then 
you can see the effect of search program's performance.