Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Guaranteed Optimization: Proving Nullspace Properties of Compilers (2002) (indiana.edu)
20 points by mpweiher on Aug 30, 2020 | hide | past | favorite | 2 comments


> Writing performance-critical programs can be frustrating because optimizing compilers for imperative languages tend to be unpredictable.

A fun example: C optimisers are sometimes permitted to optimise away infinite loops. (This is due to the interesting way C is defined, rather than anything inherent to imperative programming.)

https://news.ycombinator.com/item?id=13640636


Also the rules for this are different between C and C++. In C `while(1){}` cannot be removed, while in C++ it can.




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

Search: