3 ms·
FORTRAN is very popular in Physics. They have some private heavily optimized libraries written in 1980 and updated and improved each year and they are not going
by gus_massa 8y ago
FORTRAN is very popular in Physics. They have some private heavily optimized libraries written in 1980 and updated and improved each year and they are not going to rewrite them.
You can find some code with the classic 5+1 spaces at the left, line numbers, no more than 72 characters. My recommendation is that if you are going to add new code, write nice code with proper nesting and using the "intersection" formatting http://fortranwiki.org/fortran/show/Continuation+lines http://fortranwiki.org/fortran/show/Continuation+lines . Preferably with modules, explicit types, and other modern stuff.
On the other hand, the compilers are very good. Sometimes they are faster than C because you are not expected to do too much silly things with pointers, so the compiler can understand the code better. In The Computer Language
Benchmarks Game, you can see that many times Fortran is faster than C. https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/fortran.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 8y ago> many times Fortran is faster than C Seems like those measurements show that most times the C programs were faster than the Fortran programs.
- TheRealKing 8y agoWouldn't it depend on how those benchmarks were written?
- igouy 8y agoAnd that is why all the program source code, and compiler options, and program output is shown on the benchmarks game website. (Any underlined text is a HTML link allowing you to drill-down to more detail).
- TheRealKing 8y agoI highly doubt if there would be any performance difference between carefully written Fortran, Ada, C, C++ codes. The much more relevant question is which one has the least development time for the given task.
- igouy 8y agogus_massa made a specific claim about what we could see on the benchmarks game website, and we can see that claim is really not true.