4 ms·
-O3 does autovectorization: turning your loops into a bunch of SIMD instructions, sometimes even drastically changing performance profile. If autovectorization
by hun3 2y ago
-O3 does autovectorization: turning your loops into a bunch of SIMD instructions, sometimes even drastically changing performance profile.
If autovectorization is "not that much magic" then idk what else it is.
- lifthrasiir 2y agoNowadays it's -O2. I was also surprised when I first learned this.
- gpderetta 2y agoAny optimization you are familiar with is trivial and expected. Everything else is broken compilers optimizing UB to win benchmarks.