4 ms·
The real problem is not the string concatenation, it is that stupidlyExpensiveCalculation() will evaluate, regardless of whether debugging is on or not (at leas
by TJensen 17y ago
The real problem is not the string concatenation, it is that stupidlyExpensiveCalculation() will evaluate, regardless of whether debugging is on or not (at least in Java, not sure about Ruby), since Java doesn't do lazy evaluation of arguments.
In this case, that just slows things down. Worse yet is when it is stupidCalculationWithSideEffects(). And I have seen that before. :(