eli5: How is C still the fastest mainstream language?

740 views

I’ve heard that lots of languages come close, but how has a faster language not been created for over 50 years?

Excluding assembly.

In: 2072

19 Answers

Anonymous 0 Comments

C is a fairly unsafe language. If I allocate 20 bytes of memory and then write to the 21st byte, C will let me do that no questions asked and my program may or may not crash. Do you feel lucky?

Most languages have traded raw speed for varying degrees of safety to allow programmers a better chance of writing correct bug free code. The safety and the abstractions cost a little bit of speed.

Further, some languages have even more constraints such as the ability to run a program on any hardware (Java and some others), this is more costly still.

You are viewing 1 out of 19 answers, click here to view all answers.