[pypy-dev] Small optimization

Jean-Paul Calderone exarkun at divmod.com
Wed Oct 24 14:53:02 CEST 2007


On Wed, 24 Oct 2007 14:37:07 +0200, Antonio Cuni <anto.cuni at gmail.com> wrote:
>Hi all,
>
>between some interesting and a lot of not-so-interesting talks here at 
>oospla, I also find the time to hack a bit on pypy :-).
>
>Yesterday I tried the hand-written optimization attached to this mail;
>it seems to make pystone about 6% faster; it's not much, but it's not
>even so few not to take into account, IMHO. Btw, richards does not
>show any improvement, as expected.
>
>Also, it seems that it makes pypy-cli slower, at least on mono; this
>is somewhat surprising, because IronPython entirely relies on this
>kind of if-else if tests to dispath all operations... I would have bet
>that our multimethod dispatching was slower, but it does not seems
>so. I should try also on MS .NET, though.
>
>I know that this is not the way to do such an optimization; I guess
>that the correct way would be to teach the mutlimethod installer which
>are the "hot" cases to test first, before going for a full dispatch;
>I've not clue how to do it, though. :-)

Does this break (by ignoring) custom __add__ implementations on int
subclasses?

Jean-Paul



More information about the Pypy-dev mailing list