Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 169 words in the discussion.

Trending Topics

#fortran#still#more#modern#compilers#always#core#math#libraries#performant

Discussion (4 Comments)Read Original on HackerNews

phuffabout 2 hours ago
It always boggles my mind that these core math libraries are still written in Fortran (same goes for some famous core matrix math libraries that still kick around). I have always presumed that it was because nobody knows Fortran well enough anymore to successfully translate them to something more modern.

Are we at the point yet where we might be able to replace some of these legacy Fortran libs with more modern, legible, performant Rust or C/C++?

jcsagerabout 1 hour ago
Nope. FORTRAN code is still very performant in this area with modern compilers, which is why it is still used.

It's an example of Chesterton's Fence.

CamperBob2about 1 hour ago
What's a concrete example of how FORTRAN compilers are inherently better at this type of task than modern C/C++ or Rust compilers?
mzs13 minutes ago
It's not really about the compilers ever since C99's restrict (you can almost always equal fortran performance now), it's how much more you have to think and validate about how to write the C/C++ plus the compiler and linker options to use.

Also with C99 you get many of the convenient aspects of fortran (<tgmath.h> and vardim array function args) and with C11 you also get <complex.h> now.

But you are still missing fortran's ** operator and it's more than just syntactic sugar, it accepts more types.