3 ms·
C is not the fastest language. Fortran can often beat them because is has non-aliasing function arguments and does not treat arrays like pointers. https://fort
by markkitti 3y ago
C is not the fastest language. Fortran can often beat them because is has non-aliasing function arguments and does not treat arrays like pointers.
https://fortran-lang.discourse.group/t/fortran-is-faster-than-c/5058 https://fortran-lang.discourse.group/t/fortran-is-faster-tha...
- RossBencina 3y agoI do not dispute that C is not the fastest language. However C99 has the `restrict` keyword, which when combined with strict aliasing rules gives non-aliasing function arguments (I believe).
- Joel_Mckay 3y agoDon't be cowed without evidence friend. You are not wrong. =) gcc is notoriously: 1. inefficient compared to the Intel or LLVM compiler 2. nondeterministic with -O3, which is why most people use g++ to check the code... and even then all bets are off on some hardware. 3. thrashes ram layouts, and slowly chokes to death if used as intended. It comes down to the use-case, but fortran has killed too many to trust anywhere. =)