Subject: Re: bug#58558: 29.0.50; re-search-forward is slow in some buffers

From: Eli Zaretskii <[email-masked]>
Date: Wed, 14 Dec 2022 15:10:41 +0200

> From: Ihor Radchenko <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
> Date: Wed, 14 Dec 2022 12:23:50 +0000
> 
> 18      breakpoint     keep y   0x000055555578be74 in buf_bytepos_to_charpos at marker.c:353
> 	breakpoint already hit 4,245,365 times
> 
> Combined with the fact that calling `garbage-collect' between benchmarks
> makes the benchmark time nearly constant, this result may or may not
> mean something.

Is the "almost constant" time still significantly slower thane in
previous versions?  Or is it similar?

Anyway, the fact that the time doesn't get worse when you GC between
benchmark most probably means that we produce a lot of garbage markers
(i.e., temporary markers that very quickly become unreferenced), and
they get in the way of buf_bytepos_to_charpos.