[pypy-dev] Pypy custom interpreter JIT question
brownan at gmail.com
Thu Mar 31 17:44:32 CEST 2011
Here's three emails that accidentally didn't get sent to the list.
On Thu, Mar 31, 2011 at 10:41 AM, Dan Roberts <ademan555 at gmail.com> wrote:
> Hi Andrew,
> Did you ever try your interpreter with the 99 bottles program? I got my
> interpreter down faster than the beef interpreter ~4s vs ~15s on mandelbrot,
> however even with that speed, both 'bf' and 'beef' trounced my interpreter
> by an absurd amount. It seems like it probably was a problem with my code
> base, when I first saw you were working on this I meant to ask you to try
> 99bottles.bf and see if you had similar problems. I haven't had a chance
> to examine where the problem is coming from though.
On Thu, Mar 31, 2011 at 11:02 AM, Andrew Brown <brownan at gmail.com> wrote:
> Hi Dan,
> Did you mean to send this to the list as well? I only ask because it's easy
> to hit "Reply" instead of "Reply All".
> Regardless, I have a 99 bottles program, in the comments it says it's
> written by Andrew Paczkowski. I haven't mentioned it just because it runs
> absurdly fast: 0.02 seconds or so (compared with 0.2s for running the py
> code on cpython), so I didn't consider it a good test. I wanted something
> that took a bit longer.
> I just searched for another and found one by Raphael Bois, but that runs in
> 0.04 seconds.
> Perhaps you're using a different version of this program that's less
> efficient and runs faster? (or maybe this really is just that fast?)
> Also, the mandelbrot program that I included in my repo takes 8.4 seconds
> to run on my computer. Not quite the 4 second time you're getting (have you
> published your interpreter anywhere? I'd like to look at it) I have a
> feeling I've taken this interpreter as far as it will go without doing any
> more intelligent inspection of the bf code directly.
On Thu, Mar 31, 2011 at 11:20 AM, Dan Roberts <ademan555 at gmail.com> wrote:
> Yeah, that's the second or third time I didn't reply to all lately :-/
> And my interpreter is on paste.pocoo.org somewhere, I can paste it again
> when I go home today. I suspect there's something wrong with it though,
> considering you're getting proper performance on 99bottles, it takes about 3
> minutes here! (On the same system where it wins on mandelbrot by >66%
> against 'beef' or bf whichever one is faster) One immediately obvious
> difference was your use of the bracket map, which I think is an awesome
> idea. I may adopt it, currently I calculate how far backwards/forwards to
> travel at "runtime" instead of preprocessing it. I made it pure so that it
> would be constant folded by the JIT, but I suppose the 1000 iterations
> before the JIT kicks in (per loop) could explain a large performance
> difference. I could probably combine both techniques and cache the results
> at runtime, by the second run, it'll be a dict lookup, so it'll be jitted
> essentially the same, and I won't have to think about parsing to find
> matching braces :-)
> If you can think of a good way to bring this discussion back on the mailing
> list that'd be fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pypy-dev