Fwd: Question on the future of RPython

I'm forwarding this mail that Terrence Cole sent me privately for no reason apparent to me, because without it my mail makes less sense. ---------- Forwarded message ---------- From: Terrence Cole <list-sink@trainedmonkeystudios.org> Date: Thu, Sep 30, 2010 at 03:21 Subject: Re: [pypy-dev] Question on the future of RPython To: Paolo Giarrusso <p.giarrusso@gmail.com> On Wed, 2010-09-29 at 23:50 +0200, Paolo Giarrusso wrote:
I've read parts of that at some point in the past.
Dr. Canon achieved an ~1% performance improvement. From his conclusion, the most significant problem he found was that most program data is stored in object attributes and object attributes were not type-inferable with the methods he used.
Scanning through the 7.2, they say: "In general, type analysis cannot infer the result types of non-inlined message sends, of arguments of non-inlined sends, or of assignable slots (i.e., instance variables). Since sends to such values are fairly frequent, a large fraction of message sends does not benefit from type analysis." So they seem to have run into similar problems: the type inferencing algorithm doesn't get to sink its teeth into any of the bits that most need it. Chapter3 of Cannon05 details what specific parts of python can't be type-inferred. It turns out this is most of python. For example, type inferencing can't cross module boundaries because the module used at runtime might be different from the one present at compile time. While perfectly true, this is probably going to be quite rare in practice. I think it makes sense to treat the sorts of optimizations you can do with static analysis of a dynamic language with the same sort of guarded optimism that is used in pypy's jit compiler: run with the assumption that it will all work out, but watch for failure and fallback to a safe slow-path nicely when things go off the rails.
-- Paolo Giarrusso - Ph.D. Student http://www.informatik.uni-marburg.de/~pgiarrusso/

Hi Terrence, I think that what you are describing is found in informal discussions about LLVM/HLVM, and more formally in the plans for Unladen Swallow at http://code.google.com/p/unladen-swallow/wiki/ProjectPlan . See in particular the section about Feedback-Directed Optimization. Maybe you want to discuss these ideas with the Unladen Swallow guys instead :-) Armin.

On Thu, 2010-09-30 at 08:35 +0200, Paolo Giarrusso wrote:
I'm forwarding this mail that Terrence Cole sent me privately for no reason apparent to me, because without it my mail makes less sense.
I replied to you privately because the mail from you that I was replying to did not have the list cc'd. I checked the headers several times to be sure that my mail client was not lying to me. I thought that you wanted to take the ensuing discussion off list, as it is starting to range even farther off topic for pypy-dev than it was before. Oh well. Sorry for the noise.

Hi Terrence, I think that what you are describing is found in informal discussions about LLVM/HLVM, and more formally in the plans for Unladen Swallow at http://code.google.com/p/unladen-swallow/wiki/ProjectPlan . See in particular the section about Feedback-Directed Optimization. Maybe you want to discuss these ideas with the Unladen Swallow guys instead :-) Armin.

On Thu, 2010-09-30 at 08:35 +0200, Paolo Giarrusso wrote:
I'm forwarding this mail that Terrence Cole sent me privately for no reason apparent to me, because without it my mail makes less sense.
I replied to you privately because the mail from you that I was replying to did not have the list cc'd. I checked the headers several times to be sure that my mail client was not lying to me. I thought that you wanted to take the ensuing discussion off list, as it is starting to range even farther off topic for pypy-dev than it was before. Oh well. Sorry for the noise.
participants (3)
-
Armin Rigo
-
Paolo Giarrusso
-
Terrence Cole