In a c++ file inside a loop I have the following snippet:
const bool f = func();
// if (f) break;
If I activate the line with "if (f) break;" then the performance
very much degrades.
Which g++ optimization parameter should I disable (or enable) to keep the
performance?
g++ (Debian 4.9.2-10) 4.9.2
CPU is x86_64 (AMD)
$ g++ -Wall -std=gnu++14 file.cpp -Ofast -funroll-all-loops -march=native \
-DCLS=$(getconf LEVEL1_DCACHE_LINESIZE) -msse4.2 -fschedule-insns2 \
-fsel-sched-pipelining -fselective-scheduling -fprefetch-loop-arrays \
--param prefetch-latency=300 -fno-rtti -fno-exceptions -flto \
-fwhole-program -funroll-loops -fomit-frame-pointer \
-fsel-sched-pipelining-outer-loops -fsel-sched-reschedule-pipelined \
-fselective-scheduling2 -freg-struct-return
--
Thx