3 ms·
Computers are simple machines. The simpler your output assembly is, your code will be faster. The less safeguards your language or compiler forces on your outpu
by bayindirh 3y ago
Computers are simple machines. The simpler your output assembly is, your code will be faster. The less safeguards your language or compiler forces on your output assembly, your code will be again faster.
C has the least number of safeguards, and most foot-guns by default, unless you opt-in to more. Same is for C++.
There are very legitimate reasons where you don't want bound checking in your arrays in some applications, and you can realize these in C and go really fast if you need to.
Tangentially, FORTRAN is a "FORmula TRANslator", so it's good and fast at math too. Because it is designed to do that. If you think FORTRAN and C are obsolete. Come to HPC domain, where you push languages and hardware to the limits without leaking memory and crashing randomly.