Subject: bug#77942: 31.0.50; replace-region-contents gets stuck

From: Gerd Möllmann <[email-masked]>
Date: Tue, 22 Apr 2025 05:48:14 +0200

Stefan Monnier <[email-masked]> writes:

> Gerd, IIUC you're trying to use this to benchmark the charpos->bytepos
> code, in which case you should be better served by a call where the text
> and its replacement are of fairly similar size.

That's right, it's for a bencnmark that helps me to get an impression if
avoiding the binary search in the charpos -> bytepos case is worth it.
Now that I know what replace-region-contents does, that's no problem.

But honestly, what the heck? Does someone know what this diffing is
about in the first place? I mean, that replacing a region takes O(ND) is
not something that I would have thought possible.