3 ms·
I am aware of the aliasing issue and that is exactly what I hinting at with (a) and (b) I think aliasing is only a part of the story. I have benchmarked (now l
by srean 12y ago
I am aware of the aliasing issue and that is exactly what I hinting at with (a) and (b)
I think aliasing is only a part of the story. I have benchmarked (now long lost) Fortran and C++ with __restrict__ pointers(non-standard, but supported on gcc which is what I was using). Fortran still came out faster, and yes __restrict__ did make a difference in the runtime of the loop.
In retrospect I should have kept the code around so that I could show the assembly to someone who could read and see whats going on. I dont really know Fortran, it was just a one-off noodling fueled by curiosity.