Accelerating Method Dispatch

1 view
Skip to first unread message

Chromatic

unread,
Sep 13, 2006, 1:42:15 PM9/13/06
to parrot-...@perl.org
Avi Bryant and Piers Cawley have some thoughts about improving method dispatch
speed for the common case, based on ideas in Sun's Strongtalk and the Self
language:

http://www.bofh.org.uk/articles/2006/09/13/what-we-have-here-is-an-opportunity-to-accelerate
http://smallthought.com/avi/?p=16

Is this similar to (or even the same as) PIC?

-- c

Andy Armstrong

unread,
Sep 13, 2006, 2:25:36 PM9/13/06
to chromatic, parrot-...@perl.org
On 13 Sep 2006, at 18:42, chromatic wrote:
> Avi Bryant and Piers Cawley have some thoughts about improving
> method dispatch
> speed for the common case, based on ideas in Sun's Strongtalk and
> the Self
> language:
>
> http://www.bofh.org.uk/articles/2006/09/13/what-we-have-here-is-an-
> opportunity-to-accelerate
> http://smallthought.com/avi/?p=16

What they describe is effectively branch prediction for method
despatch. Instead of looking up the right place to go and then going
you go to the most likely place and then check that you did the right
thing.

> Is this similar to (or even the same as) PIC?

It's not quite the same is it? The method Avi and Piers describe
involves a normal call to a method the first action of which is to
find out whether it's really the correct method.

--
Andy Armstrong, hexten.net

Leopold Toetsch

unread,
Sep 14, 2006, 3:19:49 AM9/14/06
to perl6-i...@perl.org
Am Mittwoch, 13. September 2006 19:42 schrieb chromatic:
> Is this similar to (or even the same as) PIC?

The SELF-thingy yes. MMD infix operations are using the PIC with the
direct-threaded and switched runtime cores (i.e. with the predereferencing
cores) already. A lot more could be cached, it's a mere matter of coding
these optimizations. The infrastructure is already there.

I was using the Hoelzle paper as reference ;)

leo

Reply all
Reply to author
Forward
0 new messages