On Mon, May 25, 2015 at 12:55:40PM +0200, OndÅej BÃlka wrote: > Gcc doesn't do any optimizations with these but misses several. > Also next optimization is that memchr(s, 0, n) could be converted to calling strnlen (s, n) and converting result.