10 ms·
To elaborate: When people mention that supercomputing relies on Fortran code because it runs faster, that's primarily because the compiler knows the program can
by hughw 10y ago
To elaborate: When people mention that supercomputing relies on Fortran code because it runs faster, that's primarily because the compiler knows the program can't modify a loop counter. So an optimizer can shovel off big arrays to array processors (1970s), GPUs (now), registers, etc, and do parallel or superscalar computation.
The FOR loop become a hint that tells the compiler it can take extraordinary measures on the nested instructions.
You could do the same thing in C if you use compiler directives, or in other languages like Pascal, but there's a critical mass of Fortran code, so that's where vendors put the effort.
- fusiongyro 10y agoAliasing also complicates matters in C.