3 ms·
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.
by nejenendn 9y ago
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.
- vram22 9y agoIt say something like that here: https://en.wikipedia.org/wiki/Restrict https://en.wikipedia.org/wiki/Restrict
- pjmlp 9y agoKind 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++.
- nejenendn 9y agoAgreed. 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.
- pjmlp 9y agoThere are more compilers out there, although I do agree in the context of HPC, those are probably the most used ones.
- noobermin 9y agoWhat 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
- quadruplebond 9y agoEigen isn’t good enough? You can offload some stuff to MKL with it also.
- deleted 9y ago[deleted]