<br><br><div class="gmail_quote">On Sun, Jan 1, 2012 at 11:13 AM, Laurence Tratt <span dir="ltr"><<a href="mailto:laurie@tratt.net">laurie@tratt.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, Jan 01, 2012 at 07:02:14PM +0200, Maciej Fijalkowski wrote:<br>
<br>
>> Here's an example (hopefully a decent one!):<br>
>><br>
>> <a href="http://pastebin.com/51QpPD7C" target="_blank">http://pastebin.com/51QpPD7C</a><br>
> so for example here, tracing has taken 0.8s out of 2.5 total (a lot) + 0.2s<br>
</div>> for the backend. If you can post some example I can probably look at<br>
<div class="im">> traces.<br>
><br>
> For example - is the loop iteration from above a good one?<br>
<br>
</div>I don't know if it's a good one or not :) This is a real program executing<br>
under the Converge JIT - the Converge compiler. If you have a checkout of the<br>
Converge VM and have built the VM with a JIT, you can recreate this by doing:<br>
<br>
$ cd compiler<br>
$ PYPYLOG=jit-summary:stats ../vm/converge convergec -o Compiler/Code_Gen.cvb Compiler/Code_Gen.cv<br>
<div class="im"><br>
> Also, there were 16 loops aborted because trace run out for too long. That<br>
> might mean a lot of things.<br>
<br>
</div>I'm going to assume this is because (at least as I've done things so far) the<br>
VM is effectively inlining all calls to RPython-level functions (in other<br>
words, if the bytecode calls a builtin function, the latter is inlined). It's<br>
not clear to me whether this is entirely desireable - sometimes it might be<br>
sensible, but often not. How does PyPy handle this? Does it have a blanket<br>
"don't look inside builtin functions" for example?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Laurie<br>
--<br>
Personal <a href="http://tratt.net/laurie/" target="_blank">http://tratt.net/laurie/</a><br>
The Converge programming language <a href="http://convergepl.org/" target="_blank">http://convergepl.org/</a><br>
<a href="https://github.com/ltratt" target="_blank">https://github.com/ltratt</a> <a href="http://twitter.com/laurencetratt" target="_blank">http://twitter.com/laurencetratt</a><br>
_______________________________________________<br>
pypy-dev mailing list<br>
<a href="mailto:pypy-dev@python.org">pypy-dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pypy-dev" target="_blank">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>
</div></div></blockquote></div><br>Take a look at pypy/module/pypyjit/policy.py it shows the JITPolicy for which functions can be inlined.<div><br></div><div>Alex<br clear="all"><div><br></div>-- <br>"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br><br>
</div>