+ 2

Are some programming languages faster than others?

like many time we heard that python is slow and c is fast,if it is true than how do we determines that, which factors affecting speed of languages.. answer plsss....

23rd May 2018, 8:52 PM
vivek kustwar
vivek kustwar - avatar
7 odpowiedzi
+ 1
it’s Not error checking that makes the language fast or not but how high or lowlevel it is. C/c++ can be compiled into very efficient programs that run directly on the processor, java and c# get translated into bytecode that gets just in time compiled which adds a lot of overhead, JavaScript and other scripting languages run on a mix of just in time compilation and interpreting and don’t have an efficient intermediate bytecode so you have even more overhead there and you won’t get similar results with Pyopengl or pygame. With high end graphics the cpu really struggles to push enough data to the graphics card scene when using highly optimized c++ so it will struggle a lot harder when you use python
23rd May 2018, 10:47 PM
Max
Max - avatar
+ 2
Compiled such as C/C++ Pascal, Delphi are always faster then a scripting language or byte code because they compile to machine code that the CPU executes. Byte code such as Java relies on an interrupter to run it's byte code it's like machine code but is executed with a virtual machine. scripting is done by executing each line of the script and added syntax error, checking makes scripting quite slow. how ever on today's machine you don;t notice it as much unless the engine is badly written.
24th May 2018, 1:38 PM
Ben
Ben - avatar
0
what is bytecode
24th May 2018, 8:17 AM
vivek kustwar
vivek kustwar - avatar
0
what is difference between scripting languages and programming languages
24th May 2018, 8:22 AM
vivek kustwar
vivek kustwar - avatar
- 1
C and C++ is just run, it doesn't check for errors before running. That's why Python is slower it does. But with PyGame and PyOpenGL you can achieve pretty similar results.
23rd May 2018, 9:00 PM
Paul Grasser
Paul Grasser - avatar
- 1
let me explain little about error checking
23rd May 2018, 9:02 PM
vivek kustwar
vivek kustwar - avatar
- 1
A intermediate code that’s very easy for the computer to parse and translate to machine code
24th May 2018, 8:18 AM
Max
Max - avatar