News for hackers. Stuff that matters.
Re:So you want to write a fast Python? by kingkilr on Sunday July 10, 2011 @10:26PM (#2749225)
* The JIT is written in RPython.

* Comparing code with C is pretty difficult for all but the easiest 1-1 ports (i.e. numeric stuff), so I don't have good comparison numbers for it.

* Yes, I tried to improve the submissions to the benchmark game, this led down a long path which resulted in the benchmark game only having a single implementation for each language (e.g. tracemonkey is no longer on there, only v8)

* We don't plan on writing a new language, we kind of like Python, but someone absolutely could.

* PyPy doesn't have a VM, we have a toolkit for writing VMs and adding JITs to them. Perhaps these two blog posts will make it more clear: http://morepypy.blogspot.com/2011/04/tutorial-writing-interp... http://morepypy.blogspot.com/2011/04/tutorial-part-2-adding-...

Re:So you want to write a fast Python? by wbhart on Sunday July 10, 2011 @10:51PM (#2749266)
I think I understand now. The PyPy implementation of Python is written using the RPython -> Jit interpreter framework that the PyPy project has. Clever.

Am I right in thinking that the drawback of this method is very long compile times for producing the interpreter?

Re:So you want to write a fast Python? by kingkilr on Sunday July 10, 2011 @10:59PM (#2749285)
Yes, compile times are rather long, about 40 minutes for the full interpreter on a recent, fairly good, laptop. On the other hand you don't need to do a compile all that frequently, because all the code is testable by executing directly atop another Python.
Re:So you want to write a fast Python? by StavrosK on Monday July 11, 2011 @11:24AM (#2751068)
So you develop the interpreter by interpreting it on itself before compiling it to itself by itself.

Uh...

Re:So you want to write a fast Python? by cscheid on Tuesday July 12, 2011 @07:28PM (#2757086)
You might have some fun reading about the Futamura projections :)
Re:So you want to write a fast Python? by StavrosK on Tuesday July 12, 2011 @07:59PM (#2757168)
Oh God, that stirs some memories. I'll read it again, thank you.