Ask HN: How to compare different programming languages

1 points by indoindo ↗ HN
C++ is best for performance, in this case how to compare c++ to other languages in term of performance.

6 comments

[ 781 ms ] story [ 232 ms ] thread
Assembly code is best for performance but it is a huge pita.
Of course, but how to determine languages that near ASM performance
C, c++ and ask permit allocation on the stack. Many others require dynamic allocation. Whether one language is faster depends on whether the problem at hand can take advantage of stack allocation.
Most modern computers have caches. On the whole they speed you up but some access patterns lead caches to slow you down. Some instruction set architectures have more registers than others.

So the fastest language also has to consider the hardware it is used on.

Thank you very much! insightful comments!
Some people just aren't very good coders. No language will make their programs run faster. What will are books like effective c++, effective java and refactoring.

The fastest language only makes sense when the code is written by an expert.