[pypy-dev] Question on the future of RPython

Terrence Cole list-sink at trainedmonkeystudios.org
Sun Sep 26 23:28:12 CEST 2010


On Sat, 2010-09-25 at 17:47 +0200, horace grant wrote:
> i just had a (probably) silly idea. :)
> 
> if some people like rpython so much, how about writing a rpython
> interpreter in rpython? wouldn't it be much easier for the jit to
> optimize rpython code? couldn't jitted rpython code theoretically be
> as fast as a program that got compiled to c from rpython?
>
> hm... but i wonder if this would make sense at all. maybe if you ran
> rpython code with pypy-c-jit, it already could be jitted as well as
> with a special rpython interpreter? ...if there were a special rpython
> interpreter, would the current jit generator have to be changed to
> take advantage of the more simple language?

An excellent question at least.  

A better idea, I think, would be to ask what subset of full-python will
jit well.  What I'd really like to see is a static analyzer that can
display (e.g. by coloring names or lines) how "jit friendly" a piece of
python code is.  This would allow a programmer to get an idea of what
help the jit is going to be when running their code and, hopefully, help
people avoid tragic performance results.  Naturally, for performance
intensive code, you would still need to profile, but for a lot of uses,
simply not having catastrophically bad performance is more than enough
for a good user experience.  

With such a tool, it wouldn't really matter if the answer to "what is
faster" is RPython -- it would be whatever python language subset
happens to work well in a particular case.  I've started working on
something like this [1], but given that I'm doing a startup, I don't
have nearly the time I would need to make this useful in the near-term.

-Terrence

[1] http://github.com/terrence2/melano

> just curious...
> 
> 
> On Tue, Sep 7, 2010 at 11:07 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> > Armin Rigo, 07.09.2010 10:57:
> >> On Mon, Sep 6, 2010 at 8:27 PM, Saravanan Shanmugham
> >>> Is there a wish list of RPython enhancements somewhere that the
> >>> PyPy team might be considering?
> >>> Stuff that would benefit RPython users in general.
> >>
> >> Again, feel free to make a fork or a branch of PyPy and try to develop
> >> a version of RPython that is more suited to writing general programs
> >> in.
> >
> > In that case, I suggest working on Shedskin or Cython instead.
> >
> > Stefan
> >
> > _______________________________________________
> > pypy-dev at codespeak.net
> > http://codespeak.net/mailman/listinfo/pypy-dev
> >
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev






More information about the Pypy-dev mailing list