On Mon, Jun 20, 2022 at 12:12:53PM -0700, Noah Goldstein wrote:
> Got it. Will have that in V2.

Thanks.
> 
> We could also make the initial:
> bool is_strchr_zerop = integer_zerop (chr);
> 
> Only check the lower 8 bits.

Sure.  Though, in that case it is just an optimization,
it is ok to not to optimize strchr (x, 256); as
strchr (x, 0);, but it is not ok to optimize strchr (x, 256);
into memchr (x, 256, strlen (x)); so for the strlen (x) vs. strlen (x) + 1
decision it is needed for correctness.

        Jakub

Reply via email to