I don't think this is true. C++ matrix template libraries are competitive with anything that Fortran can do.
Re:Why physicists still use Fortran
by radioactivist on Monday December 19, 2016 @08:37AM
(#13211265)
Well, in the case of Eigen it's an entirely header based library, so the compiler can optimize some things. Not to mention the template based meta-programming strategies [1] Eigen itself uses to simplify and optimize during compilation (including vectorization and loop unrolling). The fact that this kind of infrastructure can be built up in a library in C++, i.e. it doesn't have to be baked into the compiler, is a huge plus I think relative to Fortran.
[1] https://eigen.tuxfamily.org/dox/TopicInsideEigenExample.html
Fortran is not the fastest language around the block, but if you don't want to go into non-portable machine-based hand-tuned optimisations (e.g. loop unrolling) it's hard to beat. Basically, if you optimise for both runtime and programmer time for HPC applications I'd argue that Fortran is top of the crop.