
Guaranteed Optimization: Proving Nullspace Properties of Compilers (2002) - mpweiher
https://help.luddy.indiana.edu/techreports/TRNNN.cgi?trnum=TR564
======
MaxBarraclough
> 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](https://news.ycombinator.com/item?id=13640636)

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

