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

Sometimes -O3 produces slower code than -O2. Sometimes it produces incorrect code.

I usually compile with -O2 and annotate certain functions with O3 - if it looks like vectorization will give the function a boost.



To be honest I don't understand why isn't -O2 the default. Also does anyone ever use -O1?!


-O1 is good for debugger compatibility, and for avoiding compiler bugs at higher levels.




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

Search: