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

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 25 Sep 2020 13:32:38 +0200

Mattias Engdegård <[email-masked]> writes:

>> Right, so if the multibyteness differs, then do another check to see
>> whether both strings are all-ASCII anyway, and do the comparison without
>> conversion...
>
> Both strings don't need to be all-ASCII; one of them suffices.

Hm, yes, that's true...  and I guess a further micro-optimisation would
be if NEEDLE is non-ASCII and HAYSTACK is all-ASCII, then there's no
point in memmem-ing at all. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no