Jochen Theodorou wrote:
> Charles Oliver Nutter schrieb:
>> We largely had the same opinion, that once the inline cache was 
>> installed the per-class cache was unnecessary.
> 
> well we have no inline cache. We had a per-class 
> method-call-argument-types-and-name cache. Which maybe can be seen as 
> inline cache... This kind of cache is troublesome, because you need to 
> make a key out of the method name and the argument types. Generating 
> this key and searching with it in a HashMap, even if then done in O(1) 
> takes almost as long as the method selection itself. When you do call 
> site caching you bypass the method selection anyway, then there is no 
> need to pass through a cache that is there to speed up the method 
> selection. Thereore that cache can vanish. In my ClosureMetaClass for 
> exmaple I wrote a MetaClass that has a method selection that is special 
> to the needs of our Groovy Closures. This method selection is faster 
> than the cache and I plan to migrate the techniques from there to our 
> normal MetaClasses, to make them faster and to once and for all remove 
> that per class cache.

Perhaps there's some confusion here. To me, an inline cache is a 
specific type of call site cache. I considered Groovy's call site cache 
to be an inline cache. What do you feel is the difference?

JRuby has a type, InlineCachingCallSite, instantiated one-per-callsite 
in the system, which abstracts all logic of calling and caching a method 
for a given call site. We have also experimented with polymorphic inline 
caches, but they were rarely useful enough to warrant the extra 
complexity (and memory use).

- Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to