Re:Why physicists still use Fortran (2015)
by nejenendn on Sunday October 15, 2017 @12:28PM
(#15477826)
Fortran is easier to optimize compared to c/++ if you don’t use restrict for the c end. If you do use restrict (iirc) the compilers are competitive.
[ Parent
| on HN ]
Re:Why physicists still use Fortran (2015)
by noobermin on Sunday October 15, 2017 @03:42PM
(#15478900)
What I don't get is why someone doesn't make a superb template library with C++ that hides the restricts; it would make writing performant codes in C++ easier and you'd get the host of what C++ has to offer
Re:Why physicists still use Fortran (2015)
by quadruplebond on Sunday October 15, 2017 @06:44PM
(#15479761)
Eigen isn’t good enough? You can offload some stuff to MKL with it also.
Kind of, compilers don't enforce correct use of restrict which opens the doors to strange errors, as it is UB if they actually do overlap.
Which is the main reason why ANSI C++ members are not keen in having restrict in C++.
Re:Why physicists still use Fortran (2015)
by nejenendn on Sunday October 15, 2017 @02:30PM
(#15478416)
Agreed. However, C++ pragmatically does have restrict in both clang and g++, which is still useful in cases where you can deductively prove the lack of aliasing.
There are more compilers out there, although I do agree in the context of HPC, those are probably the most used ones.