3 ms·
The problem is deciding what kind of optimizations are 'resonable'. In one context, assuming x+1 is greater than x will avoid some wasteful code in your loops.
by Dylan16807 13y ago
The problem is deciding what kind of optimizations are 'resonable'. In one context, assuming x+1 is greater than x will avoid some wasteful code in your loops. In another context, it could destroy your program's logic. If you restrict yourself to guaranteed-safe optimizations, you miss out on most of the potential gains.