Live data from Hacker News

How fast can we make interpreted Python?

phi-node.com

81–83 of 83 posts

Re: How fast can we make interpreted Python?

#81

Earlier quoted context omitted.

I've actually seen most of those, I guess I'm more advanced than I thought :)

You're probably ready to write your own JIT -- I'd recommend making one for Python ;-) I think after the low-hanging fruit above, there's lot of weird interpreter/compiler folklore on old usenet posts, Forth VM designs, random papers (like the Register vs. Stack machine showdown). There are also some enlightening books like "Lisp in Small Pieces". I'm at SciPy right now and I was just talking to the Julia developers…

JIT? ...as soon as I get over my perfectionism long enough to finish the parser :)

I'd enjoy being on a project like that. Can I send you an email?

Re: How fast can we make interpreted Python?

#82

Earlier quoted context omitted.

You're probably ready to write your own JIT -- I'd recommend making one for Python ;-) I think after the low-hanging fruit above, there's lot of weird interpreter/compiler folklore on old usenet posts, Forth VM designs, random papers (like the Register vs. Stack machine showdown). There are also some enlightening books like "Lisp in Small Pieces". I'm at SciPy right now and I was just talking to the Julia developers…

JIT? ...as soon as I get over my perfectionism long enough to finish the parser :) I'd enjoy being on a project like that. Can I send you an email?

Sure, it's alex dot rubinsteyn atop google's excellent email service.

Re: How fast can we make interpreted Python?

#83

I don't think its correct to say the CPython is slow. What you can more accurately say about CPython is that the performance is highly variable. Some things are very fast, while others are comparatively slow. The slow things tend to be the sort of numerical loops that you see in micro-benchmarks. It's no coincidence that the version of Python in the linked article saw its greatest speed up in a numerical loop, but on…

it really is a slow interpreter. Python comes with a pystone benchmark, and CPython is invariably the slowest of all interpreters. This being said, if you take a look at it's implementation, then it's immediately obvious why. The interpreter is a basically a simple C switch, with no optimization whatsoever. Simply threading the interpreter would make it about a factor 2 faster (at least that's what the experts claim…

[deleted]
Post reply on HN