3 ms·
Suppose A and B are fixed length arrays. C = A + B - A is easily optimized in fortran, to a no op if C is not modified afterwards, and to a copy if it is. I
by fooker 3y ago
Suppose A and B are fixed length arrays.
C = A + B - A
is easily optimized in fortran, to a no op if C is not modified afterwards, and to a copy if it is.
In C this is pretty much impossible.
To be fair, there are C like languages (ispc, glsl) which makes this work with heroic compiler efforts.