3 ms·
Is there any significant work done on GCC optimizer these days? Most of the changes in recent releases are about nicer error messages (which I love), sanitizers
by bluecalm 8y ago
Is there any significant work done on GCC optimizer these days? Most of the changes in recent releases are about nicer error messages (which I love), sanitizers/UB detection (which I also love), new C++ features support (which I think is waste of brain power and time but well, most people like it) but there is little in optimizer department.
From me experience GCC generates by far the fastest code (faster than Intel, Clang and Visual Studio). I realize it's hard to make progress after so many years but I am wondering if there is any promising direction which is researched these days or is it only about small fixes here and there.
- rurban 8y agoThere needs to be work done, because for my usecases icc is usually a few percentages faster and newer clang almost twice as fast, with proper constexpr support. It's only memset, memcpy though, so who cares.
- rurban 8y agoTo the downvoters: This is the benchmark where GCC looses big time to clang: https://github.com/rurban/safeclib/blob/master/tests/perf_memcpy_s.c https://github.com/rurban/safeclib/blob/master/tests/perf_me... My clang compiled memcpy_s is faster than the handoptimized glibc assembler and twice as fast than the GCC version. So with a proper compiler you can get rid of handoptimized unportable optimizations easily. In this case memcpy, but also memset, memmove, memchr, ...
- benchaney 8y agoOptimizer improvements are generally added to major version releases. For example if you look at the 8.1 release it has a number of optimization improvements [0]. Not sure how much focus that is receiving right now though. [0] https://gcc.gnu.org/gcc-8/changes.html https://gcc.gnu.org/gcc-8/changes.html