[PATCH] Optimize strchr (s, 0) to strlen

Jeff Law law@redhat.com
Fri Sep 16 15:37:00 GMT 2016


On 09/16/2016 07:28 AM, Wilco Dijkstra wrote:
>
> I noticed rawmemchr taking non-trivial amounts of time in various profiles
> despite no use of rawmemchr in any of the source code. It's apparently a
> common idiom to use strchr (s, 0) to find the end of a string.
A bit of a surprise, but it is what it is I guess.

jeff




More information about the Gcc-patches mailing list