4 ms·
There are some optimizations Fortran compilers can make which C compilers cannot, though we can use the "restrict" keyword to allow C to make the same assumptio
by solinent 7y ago
There are some optimizations Fortran compilers can make which C compilers cannot, though we can use the "restrict" keyword to allow C to make the same assumptions Fortran makes for aliasing pointers (ie. there are none).
However, in order to support all existing C programs I believe they still can't make the same level of optimization as Fortran does. It'd be nice to see this gap merged, in fact.
C++ can actually do better with some numeric code since commonly used libraries perform expression optimization at compile-time using Eigen for example.