Subject: Re: bug#43598: replace-in-string: finishing touches

From: Mattias Engdegård <[email-masked]>
Date: Sun, 27 Sep 2020 13:57:35 +0200

27 sep. 2020 kl. 13.48 skrev Lars Ingebrigtsen <[email-masked]>:

> Didn't you just move the STRING_MULTIBYTE bits of the test from the
> string_ascii_p function and open-code it into Fstring_search function
> here?

No, look again. Previously, we would loop through all bytes of a unibyte needle before checking the lengths of a multibyte haystack. With the patch, we always do the cheap (length) check first. That's why that check had to be moved out of the helper function.