]> git.sesse.net Git - stockfish/commitdiff
Add -funroll-loops to CXXFLAGS
authorDisservin <disservin.social@gmail.com>
Mon, 14 Aug 2023 11:49:41 +0000 (13:49 +0200)
committerDisservin <disservin.social@gmail.com>
Wed, 16 Aug 2023 19:25:42 +0000 (21:25 +0200)
Optimize profiling data accuracy by enabling -funroll-loops during the profile
generation phase, in addition to its default activation by -fprofile-use.
This seems to produce a slightly faster binary, for most compilers.

make -j profile-build ARCH=x86-64-avx2

sf_base =  1392875 +/-   5905 (95%)
sf_test =  1402332 +/-   7303 (95%)
diff    =     9457 +/-   4413 (95%)
speedup = 0.67896% +/- 0.317% (95%)

STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 34784 W: 8970 L: 8665 D: 17149
Ptnml(0-2): 115, 3730, 9405, 4019, 123
https://tests.stockfishchess.org/tests/view/64d944815b17f7c21c0e92e1

closes https://github.com/official-stockfish/Stockfish/pull/4750

No functional change

src/Makefile

index c7e059ea925ef5e1fdbd182ac7a4853bc157f5f0..0a3f8329859d140b020e527a8a30c2e5b3d95491 100644 (file)
@@ -562,7 +562,7 @@ endif
 ### 3.3 Optimization
 ifeq ($(optimize),yes)
 
-       CXXFLAGS += -O3
+       CXXFLAGS += -O3 -funroll-loops
 
        ifeq ($(comp),gcc)
                ifeq ($(OS), Android)