Why is it always said that when it comes to execution time nothing beats C. Why can't higher level languages achieve that? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Why is it always said that when it comes to execution time nothing beats C. Why can't higher level languages achieve that?

21st Apr 2018, 8:09 PM
Cyan
Cyan - avatar
5 Answers
+ 5
C generates processor instructions so has a huge speed advantage over all the languages that don't (e.g. Java, Python.) It's libraries are simple so it doesn't require massive memory for them that takes time to load/page in&out. C++ can't touch it because of it's libraries and OOP overhead. You end up coding more in C, but it is explict code you need, not general purpose code of C++, so it is significantly smaller than the C++ version.
21st Apr 2018, 8:32 PM
John Wells
John Wells - avatar
+ 1
C was designed to be compiled (ie transformed into machine language) and is very close to language machine in its concepts. So it is easy for a good programmer to generate efficient machine level code. So it applies well when this is the key lever for efficiency. But it is less good when optimizing complex algorithms / datastructure is more important. Then languages allowing a higher speed of development will help devs focusing their time where it is the most useful. This is what higher languages do - helping developpers,focusing on higher level concerns.
21st Apr 2018, 9:26 PM
VcC
VcC - avatar
0
because they r higher!
21st Apr 2018, 8:17 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
it's because c is a lower level language (for a high level language) and as such it allows you to optimize your code for a given machine better at least that's my understanding
21st Apr 2018, 8:24 PM
Rational Agent
0
Principally because it direcly compile code executable on machine (without intermediars like VM, interpreter etc)... Its like an english that speak with another english while not-compiled languages are paragonable like an italian speak to an english through an interpreter 😁.. But its not a C prerogative and its not the only reason
21st Apr 2018, 8:27 PM
KrOW
KrOW - avatar