[pypy-dev] JIT for scripts

Alex Şuhan alex.suhan at gmail.com
Wed Jun 1 18:42:07 CEST 2011


On 06/01/2011 07:33 PM, Dima Tisnek wrote:
> On 1 June 2011 05:14, Alex Şuhan<alex.suhan at gmail.com>  wrote:
>> Hello.
>>
>> PyPy works great for our PHP JIT interpreter, with nice speedups for most of
>> the processing-intensive (with loops), shootout-ish scripts. However, I feel
>> that short scripts running often could benefit from tracing as well if we
>> make the interpreter „persistent” -- that is, keep all the scripts in
>> memory, create a jump (with a variable target) for dispatching the requested
>> script and a backward jump (to the fore-mentioned dispatch jump) at the end
>> of each script. This article:
>> http://morepypy.blogspot.com/2010/11/improving-memory-behaviour-to-make-self.html
>> refers to the loop_longevity JIT parameter, which suggests it's possible to
>> have alternative executions between different scripts and PyPy will simply
>> pick the appropriate trace as long as it's not too old.
>>
>> Other than the obvious duct taping, are there any caveats to this solution?
>>
>> --
>> asuhan
>> _______________________________________________
>> pypy-dev mailing list
>> pypy-dev at python.org
>> http://mail.python.org/mailman/listinfo/pypy-dev
>>
>
> Would it be practical to add compiled traces to xcache cache? (or
> .pyo/.pyj in python-speak)
>
> d.

We're using APC, not XCache, but I see your point. Sounds good, but 
it'll need a lot of tinkering with PyPy and the opcode cache 
implementation. Until we get somewhere (the whole language at the very 
least) we'll keep it as dumb as possible. Yeah, it'd be much better this 
way than an ugly concatenation of all the scripts with jumps for 
dispatching them, but we can't afford this luxury for the moment.

--
asuhan


More information about the pypy-dev mailing list