https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81657

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Wilco from comment #15)
> I don't think it's safe to compare different benchmark results like that.
> But yes the kernel for both should be very similar. The key difference is
> that strchr needs 2x the number of comparisons, which is why an optimized
> strlen will always be faster than strchr.

That is of course not true, it can do e.g. just the number of comparisons
strlen needs + 1.

Reply via email to