Submitted for everyone's approval, I've written a draft of a pypy tutorial going over everything I learned in writing this example interpreter.
On Thu, Mar 31, 2011 at 6:00 PM, Antonio Cuni <anto.cuni@gmail.com> wrote:On 31/03/11 22:05, Andrew Brown wrote:this is interesting. We are beating cpython by more than 2x even in a "worst
> python double-interpreted: > 78m (did not finish)
> pypy-c (with jit) double-interpreted: 41m 34.528s
case" scenario, because interpreters in theory are not a very good target for
tracing JITs.
However, it's not the first time that we experience this, so it might be that
this interpreter/tracing JIT thing is just a legend :-)
Well the issue with tracing an interpreter is the large number of paths, a brainfuck interpreter has relatively few paths compared to something like a Python VM.
> translated interpreter no jit: 45sthese are cool as well. We are 3x faster than gcc -O0 and ~3x slower than -O1
> translated interpreter jit: 7.5s
> translated direct to C, gcc -O0
> translate: 0.2s
> compile: 0.4s
> run: 18.5s
> translated direct to C, gcc -O1
> translate: 0.2s
> compile: 0.85s
> run: 1.28s
> translated direct to C, gcc -O2
> translate: 0.2s
> compile: 2.0s
> run: 1.34s
and -O2. Pretty good, I'd say :-)
ciao,
anto
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev
Alex
--
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero