simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

CI-unixish.yml: use LTO in the callgrind step

Open firewave opened this issue 2 months ago • 1 comments

firewave avatar Oct 28 '25 13:10 firewave

This is to make sure that we (well, me) do not try to mess with code which can actually be optimized by the compiler.

From my local system with CXX=g++ VALGRIND_TOOL=callgrind SIMPLECPP_PATH=simplecpp-1.5.1 ./selfcheck.sh:

g++ -O2 - 66,196,507 / 1,217,069,685 g++ -O2 -flto - 64,854,450 / 1,185,122,059 g++ -O3 - 65,023,794 / 1,198,427,777 g++ -O3 -flto - 65,153,503 / 1,190,654,841 clang++ -O2 - 67,422,122 / 1,227,600,090 clang++ -O2 -flto - 66,823,868 / 1,213,656,996 clang++ -O3 - 65,293,400 / 1,177,431,242 clang++ -O3 -flto - 64,801,161 / 1,164,063,469

The differences could well just be inaccuracies within callgrind but I have not looked into it yet.

firewave avatar Oct 28 '25 13:10 firewave