<br><br><div class="gmail_quote">On Sun, Jan 1, 2012 at 11:13 AM, Laurence Tratt <span dir="ltr">&lt;<a href="mailto:laurie@tratt.net">laurie@tratt.net</a>&gt;</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>
&gt;&gt; Here&#39;s an example (hopefully a decent one!):<br>
&gt;&gt;<br>
&gt;&gt;  <a href="http://pastebin.com/51QpPD7C" target="_blank">http://pastebin.com/51QpPD7C</a><br>
&gt; so for example here, tracing has taken 0.8s out of 2.5 total (a lot) + 0.2s<br>
</div>&gt; for the backend.  If you can post some example I can probably look at<br>
<div class="im">&gt; traces.<br>
&gt;<br>
&gt; For example - is the loop iteration from above a good one?<br>
<br>
</div>I don&#39;t know if it&#39;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>
&gt; Also, there were 16 loops aborted because trace run out for too long. That<br>
&gt; might mean a lot of things.<br>
<br>
</div>I&#39;m going to assume this is because (at least as I&#39;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&#39;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>
&quot;don&#39;t look inside builtin functions&quot; 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>&quot;I disapprove of what you say, but I will defend to the death your right to say it.&quot; -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
&quot;The people&#39;s good is the highest law.&quot; -- Cicero<br><br>
</div>