Suppose
calculateResValue()
modifies some external state. Would you want it to be optimized away?