4 ms·
"Just a whole bunch of inefficiencies in the implementation." That's a common misconception: what makes a language "faster" than another is not only more or le
by knz42 13y ago
"Just a whole bunch of inefficiencies in the implementation."
That's a common misconception: what makes a language "faster" than another is not only more or less optimizations in the compiler or efficiencies in the runtime. There are language features that just kill performance. The typical culprits, in descending order of cost:
- dynamic typing
- dynamic dispatch (virtual methods)
- mandated bounds checking
- existence of an "eval" function
- mandated introspection
- qznc 13y agoTo write fast code, you have to use the right data structures (impossible if everything is a hash map), manage memory (possible even with garbage collection), and be able to inline everything in the inner loops (introspection,eval,etc make this hard).