2 points · by gjsman-1000 · 8y ago · 9 comments
He then went on a tangent to the point that he began talking about his friend who had a basic hurricane simulation for a paritial PhD study. This is where things got interesting. His friend wrote the simulator said that everything had to stay in "good memory". My teacher asked him if he meant RAM or Hard Drives, which he denied and said that the "good memory" had something to do with on the actual CPU itself.
The second weird thing about this story is that this person, apparently for "performance reasons", wrote his hurricane simulator in FORTRAN. It still took days to complete each simulation, but why FORTRAN? Is it really that much better than C?
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 . 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/...
Seems like those measurements show that most times the C programs were faster than the Fortran programs.