Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

-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.



Any optimization you are familiar with is trivial and expected. Everything else is broken compilers optimizing UB to win benchmarks.


Nowadays it's -O2. I was also surprised when I first learned this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: