+ 2
Which programming language is fastest?
which programming languages have better performance and faster in the field of memory management, compilation and so on.
9 odpowiedzi
+ 8
Because I see a lot of bad or incomplete answers on this question I'd like to clear up some confusions.
1. I start with Assembly which is obviously the fastest language because it's just a fancy way to write direct CPU instructions. No compiler can possibly optimize every code as much as handwritten assembler. Because it's hard to manage a lot of assembler code it's often combined with other low-level languages.
2. Low-level or system programming languages like C, C++ and Rust have basically the same speed and are generally a little slower than Assembly but a lot easier to write. Compiling can take some time though especially if you want to build highly optimized binaries.
+ 7
3. Compiled languages with garbage collectors like Go are still quite efficient but measurably (around 2 or more times) slower than system languages. The garbage collector makes things easier (though Rust shows that you don't need a garbage collector for easy coding) but will slow down the execution and increase memory consumption.
Java and Kotlin somehow belong to the same category but are executed in a virtual machine which again reduces efficiency. Meanwhile JavaScript is (just-in-time) compiled by most browsers as well but some language features make it even slower.
4. Interpreted languages like Python are usually really really slow (around 300 times slower than system languages). They are somehow easier to learn and don't need to be compiled but have a huge performance loss.
+ 2
Many incomplete and unknowledgeable answers here, I commend Aaron Eberhardt for his great answers.
0
C is most fastest programming language
0
Guys please explain your answers by reason. thank you.
- 1
I think c and c++
- 2
C++. Maybe C and C#, but I'm not too familiar with those languages.
If you've ever tried to learn C++, you'll know just how strict the language is with variables. All types must be declared before using, and the types are not subject to change (meaning, very memory efficient). C++ is compiled to binaries, and is faster than Java since Java codes must first be interpreted during run-time.
Google has a lot of answers to a lot of questions, so maybe try it first.
- 3
Respectively: Assembly, Go, Java, C, C++
- 4
javascript