+ 2
Why c ++ is faster than most other programming languages?
I think C tends to be faster because almost everything else is written in C.
6 Antworten
+ 2
You can understand this with a real life situation.
C/C++
For example lets say you know english and you friend knows spanish .
To speak with your friend you use a translator which coverts english to spanish.
That’s what happens in c/c++
In this case you are C and your friend is the computer and translator is the compiler.
Here you only one tranlator————————————————-
Python/high level language .
Again you know english , your friends knows spanish. then you have two translator . one translator can understand english and chinese and other can tranlate chinese to spanish.
First you use the first translator to covert english to chineese beacause the second tranlator can only understand chinese.
Then you use the second tranlator to convert chinese to spanish.
here you use two translator.
python is a high level languge so use two translators and c is low level language so you use one translator. Two translators takes so much time comapred to one translator.
Answer credit : many teachers use this example
+ 3
Well it had to do with the way they're translated into machine code, python takes waay more step than compiled language like C and C++ to get to that stage.
+ 2
-1-
Thank you ✨
+ 2
C++ in actually close to machine
Something like assembly language
+ 1
Deepesh Patel yes it is
0
C++: I Am The Fastest
C:*coughs*