Comment Re:Take THAT (Score 1) 68
I fail to see the impressive part. Impressive would have been fixing GCC to optimize simple functions on its own.
memcmp (and the other functions like it) is something that gets repeated in slight variations in code A LOT, and is trivial to implement. This is almost a textbook optimizer target if I've ever seen one.
The optimizations talked about here are specific to processor models (e.g. AVX and SSE for intel) and not just architectures. Compiling them into programs is a bad idea^^, so improving gcc is not an option. The glibc mem* functions have implementations for each of those processor features and the right function to use gets implemented via the STT_GNU_IFUNC mechanism based on the features the current processor has.
^^ If you don't know why it's a bad idea, it's because you don't want to compile your program for every machine you want to run it on. You want to compile for the general architecture so that it can be distributed widely.