0

Are interpreted languages generally faster than their compiled counterparts?

When I run a code written in Python(interpreted), it executes faster than a similar(same purpose) code run in Java or C (compiled).

31st Oct 2019, 10:44 AM
A_Coder
A_Coder - avatar
5 Réponses
+ 2
An interpreted language processes your source code from scratch every time you run the program. A compiled language first translates the program to machine code or bytecode (in case of Java). This is called 'build' and can typically take longer time than actually running the program. But the upside is, you build only once and then if you don't change anything, the subsequent runs are significantly faster. So all things considered, compiled languages will always have a performance advantage.
31st Oct 2019, 11:04 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Tell about that Python program, and the similar code in Java/C. Let others test, check and verify the fact of your claim.
31st Oct 2019, 11:21 AM
Ipang
+ 1
actually it is vise versa. this guy has it explained well : https://stackoverflow.com/questions/1694402/why-are-interpreted-languages-slow
31st Oct 2019, 11:27 AM
Dan Samarawicky
Dan Samarawicky - avatar
0
Tibor Santa Ohh , great explanation. Now I get it. Thanks much.👍🏽
31st Oct 2019, 11:11 AM
A_Coder
A_Coder - avatar
0
Other answers are still welcomed.
31st Oct 2019, 11:22 AM
A_Coder
A_Coder - avatar