4 ms·
> Passing MyArray[x+3] as a macro argument would lexically copy this expression in multiple locations in the macro expansion, causing the generated code to need
by dspeyer 17y ago
> Passing MyArray[x+3] as a macro argument would lexically copy this expression in multiple locations in the macro expansion, causing the generated code to needlessly evaluate *(Myarray+x+3) again and again and again.
Wouldn't any decent optimizing compiler eliminate those common subexpressions? That's one of the basics, isn't it?
Of course, if you're in a tight enough loop to worry about that, check the assembly by hand.