[Vm-dev] "The tragedy of PIC" summary

Clément Bera bera.clement at gmail.com
Tue Jul 2 09:29:52 UTC 2013

PIC = polymorphic inline caches.

When you optimize the lookup in the VM for speed you implement the so
called inline caches: at each send site, you put information about the
result of the previous lookup done here. In most case, a send site is
monomorphic, which mean it is always the same method that is called there
(the receiver has always the same class), so the information put is the
method always called and this method is triggered instead of doing a lookup
to find the method (to increase the execution speed by avoiding lookup).

Some other send sites use polymorphism, which means there are a few
different class possible for the receiver of the send site. Inline caches
optimizations on this sites are called PIC, and the optimization is done

For more informations, there's Eliot's blog about cog here:
or the thesis of hölzle here:

The thesis of hölzle explains the basics of inline caches and their
implementation in self 91, the cog blog explains their implementation in

Hope I could help you,

2013/7/2 Tudor Girba <tudor at tudorgirba.com>

> What is PIC? :)
> Doru
> On Sun, Jun 30, 2013 at 10:06 AM, stephane ducasse <
> stephane.ducasse at gmail.com> wrote:
>> Hi eliot
>> So I was reading the PhD of Holzle and I wanted to know
>>         - I remember that at southampton (yes that far) you did a
>> presentation on the tragedy of the PIC.
>>         And I would not find the slides (because there were none).
>>         What was the pitch? That megamorphic site are killing PIC?
>>         - does VW use type feedback?
>>         if yes, what were the strategies to decide what and when to
>> recompile.
>>         - I was wondering how type feedback and PIC interact (I'm at
>> chapter 5 of the PhD so may be this is explain in the self implementation
>> part)
>>         the first case of the PIC could be based on type feedback?
>> Stef
> --
> www.tudorgirba.com
> "Every thing has its own flow"

Clément Béra
Mate Virtual Machine Engineer
Bâtiment B 40, avenue Halley 59650 *Villeneuve d'Ascq*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20130702/b21e261f/attachment.htm

More information about the Vm-dev mailing list