Re:Why Python Is Slow: Looking Under the Hood
by lispm on Wednesday November 19, 2014 @03:01AM
(#8628804)
I think the paper is even worse, in that it spreads confusion about what an Interpreter for a programming language actually is, what it does and what it provides.
The paper fails to define the concept of what to call an Interpreter. A bytecode interpreter is entirely different from a Lisp interpreter, which actually runs from source structures. Mixing VMs into the picture makes it only worse.
Part of the reason may be that they don't understand what an Interpreter actually provides and why it is used.
Re:Why Python Is Slow: Looking Under the Hood
by pjmlp on Wednesday November 19, 2014 @01:51AM
(#8628625)
It seems learning about compiler design is not as good as it used to be.
Better learn about the JavaScript framework of the day.
The seminal paper about efficient dynamic interpreters is Ertl's "The Structure and Performance of Efficient Interpreters" http://www.complang.tuwien.ac.at/papers/ertl%26gregg03jilp.p...
The abstract is: "Interpreters designed for high general-purpose performance typically perform a large number of indirect branches (3.2%–13% of all executed instructions in our benchmarks). These branches consume more than half of the run-time in a number of configurations we simulated. We evaluate how accurate various existing and proposed branch prediction schemes are on a number of interpreters, how the mispredictions affect the performance of the interpreters and how two different interpreter implementation techniques perform with various branch predictors. We also suggest various ways in which hardware designers, C compiler writers, and interpreter writers can improve the performance of interpreters."
My own input to this is that the GC, the JIT, the calling convention and esp. the size of the datastructures and ops do matter more, than eliminating the type checks.