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

From: Tony Garnock-Jones (tonyg at ccs.neu.edu)
Date: Wed May 4 18:49:13 EDT 2011

The attached (highly experimental) patch seems to improve the 
performance of normal sends (in the case of a cache hit) by roughly 100% 
- 150%. The difference between this mere factor of two improvement and 
the factor of six-through-ten I was seeing earlier is, I speculate, 
related to object-ref taking a lot of time.

Interestingly, the performance of (send something message) is, with this 
patch, seemingly roughly en par with the performance of generics 
captured using generic and invoked using send-generic.

I haven't yet tried running a full racket system with this patch 
applied. I wonder if it makes a difference to the interactive 
performance of DrRacket?

Major weaknesses of the approach:

  - overhead on cache miss is unknown
  - not safe-for-space yet (weak boxes are immutable)

The approach should generalize easily to polymorphic inline caches.

Regards,
   Tony
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: experimental-inline-cache.patch
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110504/c0668760/attachment.ksh>

Posted on the dev mailing list.