<br><div><span class="gmail_quote">On 8/20/06, <b class="gmail_sendername">Phillip J. Eby</b> &lt;<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>&gt; wrote:</span><div><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt;My initial crude benchmark results are good, simple loops with math ops<br>&gt;have a 2x increase in speed, with nested loops gaining even more.&nbsp;&nbsp;This is<br>&gt;without any stack movement reduction yet, so once I implement that I think
<br>&gt;the performance will jump even more.<br><br>I'm impressed, but also very surprised.&nbsp;&nbsp;I'd really like to see what it is<br>that you're doing, because given the goals and steps that you laid out, I<br>wouldn't have expected such a big improvement in performance without at
<br>least some inlining or type inference.&nbsp;&nbsp;In fact, I'm impressed that you got<br>any improvements at all; the C interpreter has previously been shown not to<br>really *have* that much overhead.&nbsp;&nbsp;If you're doing this while generating
<br>reasonably readable C code (i.e. at least as good as Pyrex's) then I'm in<br>absolute awe.</blockquote><div><br>I think my loop with a few math ops is sufficiently contrived enough that it can't be considered a very reliable benchmark of what's to come or much insperation for awe. ;)&nbsp; I actually expect a speedup benefit to happen only in certain cases, I suspect most functions would not benefit enough or at all to even bother.&nbsp; But I'm suprised you don't think the inner interpreter or the stack movement has much overhead, that seems to be pretty low hanging fruit to me but the future could prove me dead wrong. I remember one or two threads specifically on this subject on python-dev, but I don't remember much actual measurement being conclusively shown at the time to prove it one way or another.
<br><br>I've not studied a lot of Pyrex's output, but some through a few trials.&nbsp; I would be suprised and suspect of my own results if Pyrex didn't generate faster code than I have here, although I don't think Pyrex is as readable, it's certainly more mature and probably the closest project in terms of goals.&nbsp; I think my experiment is much simpler than Pyrex though, not having to maintain a language parser or complex code generator or deal with some of the restrictions Pyrex has.&nbsp; One of my main goals is to maintain 100% interpreter compatibility.
<br></div><br></div>-Michel<br>