https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
--- Comment #34 from Björn Stenberg ---
Yes, confirmed. -O3 and -O0 now both run the same speed so this bug is fixed.
Sorry for being potentially several years late confirming this.
memcmp-intensive code becomes up to 6 times slower if compiled with the -O3
option than with the -g or -O0 option. The reason for this is that the inline
memcmp function is *much* slower than the glibc memcmp.
Here's a simple test case:
#include
#include
#include
#include
void* list[1024 * 1