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

Why not just turn off (or down) optimizations? I mean, optimization is not even activated by default


Unfortunately it's not necessarily specified what counts as "an optimisation". For example, the (DSP-related) compiler I worked on back in the day had an instruction selection pass, and much of the performance of optimised code came from it being a very good instruction selector. "Turning off optimisations" meant not running compiler passes that weren't required in order to generate code, we didn't have a second sub-optimal instruction selector.

And undefined behaviour is still undefined behaviour without all the optimisation passes turned on.




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

Search: