On Sunday 11 September 2005 13:27, Anders Johansson wrote:
then it is much easier for the compiler to generate the "good" code that increments x while it's still held in memory
argh. Still held in a register, I meant Very very true. On a register rich system (such as Alpha, IA64, PA-RISC) automatic variables may never be stored in memory. int increment2(int x) { int y = x + 2; return y; } In this case, x would be passed via register, y would be held in a scratch register, and the return value would also be placed in a register. Most likely, the compiler may not even store anything in
On Sun, 11 Sep 2005 13:32:05 +0200
Anders Johansson