r/C_Programming • u/Valorant_Steve • Mar 12 '24
Discussion Why is C so fast and is it possible to create a faster language than C?
Why is C so fast and is it possible to create a faster language than C?
143
Upvotes
r/C_Programming • u/Valorant_Steve • Mar 12 '24
Why is C so fast and is it possible to create a faster language than C?
313
u/pedersenk Mar 12 '24
Fortran is often cited as being faster than C in specific usecases (i.e heavy maths).
Really though, any language that can generate native machine code without any runtime error checking will reach equal performance.
C++, Rust, Ada, Objective-C, etc can produce almost identical instructions if you avoid their (useful) runtime safety features. This is the compromise that many developers have to make.