[pypy-dev] How to turn a crawling caterpillar of a VM into a graceful butterfly
alex.gaynor at gmail.com
Sun Jan 1 20:27:08 CET 2012
On Sun, Jan 1, 2012 at 11:13 AM, Laurence Tratt <laurie at tratt.net> wrote:
> On Sun, Jan 01, 2012 at 07:02:14PM +0200, Maciej Fijalkowski wrote:
> >> Here's an example (hopefully a decent one!):
> >> http://pastebin.com/51QpPD7C
> > so for example here, tracing has taken 0.8s out of 2.5 total (a lot) +
> > for the backend. If you can post some example I can probably look at
> > traces.
> > For example - is the loop iteration from above a good one?
> I don't know if it's a good one or not :) This is a real program executing
> under the Converge JIT - the Converge compiler. If you have a checkout of
> Converge VM and have built the VM with a JIT, you can recreate this by
> $ cd compiler
> $ PYPYLOG=jit-summary:stats ../vm/converge convergec -o
> Compiler/Code_Gen.cvb Compiler/Code_Gen.cv
> > Also, there were 16 loops aborted because trace run out for too long.
> > might mean a lot of things.
> I'm going to assume this is because (at least as I've done things so far)
> VM is effectively inlining all calls to RPython-level functions (in other
> words, if the bytecode calls a builtin function, the latter is inlined).
> not clear to me whether this is entirely desireable - sometimes it might be
> sensible, but often not. How does PyPy handle this? Does it have a blanket
> "don't look inside builtin functions" for example?
> The Converge programming language
> https://github.com/ltratt http://twitter.com/laurencetratt
> pypy-dev mailing list
> pypy-dev at python.org
Take a look at pypy/module/pypyjit/policy.py it shows the JITPolicy for
which functions can be inlined.
"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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pypy-dev