+ 5
Why is it always said that when it comes to execution time nothing beats C. Why can't higher level languages achieve that?
6 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.
+ 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.
0
because they r higher!
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
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