|
|
|
|
|
by AdrianRossouw
4787 days ago
|
|
I was surprised to see when I installed R for the first time, that a large amount of the libraries it makes use of are written in fortran. To complete the installation required me to choose from one of several current and compatible fortran compilers even. So at least for fortran, the answer is scientific computing. |
|
Part of the reason is that Fortran passes arrays by value, while C passes them by reference. It's very hard for compilers to optimise a pass-by-reference array, because it might have the memory altered by another part of the program. If it's pass by value, then you know it's safe. It's kind of like threads vs messages.
I think C has some recent work done to close the gap, but even if it's already as fast, it will take a while to port 50 years of legacy numerical code.