Hacker News new | ask | show | jobs
by mcphage 3914 days ago
In theory a good optimizing compiler should see that some code doesn't depend on anything external and do it, but I'm not sure to what extent they do. GCC with higher optimization settings does do some pretty crazy stuff, so I would expect it to figure out something like in the example code pretty easily.