2 ms·
The whole idea of aliasing comes with C and arbitrary pointer arithmetics. It's not a necessity. In languages without it (beyond Fortran, Rust comes to mind), t
by nine_k 9y ago
The whole idea of aliasing comes with C and arbitrary pointer arithmetics. It's not a necessity. In languages without it (beyond Fortran, Rust comes to mind), the compiler may assume the lack of aliasing and optimize accordingly. I wonder what JVM's JIT would come up with (likely not with SSE, though).
I can agree that however you choose to represent a multi-dimensional array in RAM, giving the compiler some idea about them, or 2D matrices at least, could lead to some special optimizations.