+ 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....
7 ответов
+ 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
+ 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.
0
what is bytecode
0
what is difference between scripting languages and programming languages
- 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.
- 1
let me explain little about error checking
- 1
A intermediate code that’s very easy for the computer to parse and translate to machine code