Many compilers have one or more optional optimisation levels. As the level/amount of optimisation increases the compiler tends to spend more and more time doing the optimisation. The word 'optimisation' is perhaps misleading - perfect optimisation is a very hard problem ([[NP-complete]] or even [[undecidable]]), so a conceptually better term would be 'improvement'. | Many compilers have one or more optional optimisation levels. As the level/amount of optimisation increases the compiler tends to spend more and more time doing the optimisation. The word 'optimisation' is perhaps misleading - perfect optimisation is a very hard problem ([[NP-complete]] or even [[undecidable]]), so a conceptually better term would be 'improvement'. |