[racket-dev] Inline caching (was Re: my '312' this semester, how we compare to others)

From: D Herring (dherring at tentpost.com)
Date: Wed May 4 22:57:43 EDT 2011

On 05/04/2011 03:57 PM, Tony Garnock-Jones wrote:
> A simple experiment I just performed suggests that a monomorphic
> inline cache hit can reduce the time needed for a send in Racket from
> 350ns to around 60ns, which is a massive win. I've attached the
> program I used to measure this, FWIW. (Run it using command-line
> Racket, not DrRacket: I got some *very* weird timing artifacts out of
> DrRacket during this experiment!)
> The question, then, is: how do we implement MICs or PICs using
> Racket's macro system? Each send site needs to expand into
> - a piece of global state
> - a test involving that global state
> - a possible update to that global state

You might borrow some ideas from this description of call-site caching 
in SBCL.


Posted on the dev mailing list.