[Bug middle-end/81657] [8 Regression] FAIL: gcc.dg/20050503-1.c scan-assembler-not call

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 19 12:31:00 GMT 2018


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.


More information about the Gcc-bugs mailing list