From: Charles Oliver Nutter Date: 2007-07-16T16:01:47+09:00 Subject: Re: Proposal: runtime-modifying Kernel methods should be keywords John Lam (CLR) wrote: >> PS: Incidentally... The comment on the blog entry you gave above >> mentions call site caches. I had a student try that for Ruby, and he >> found that it couldn't beat Ruby's built-in cache. The reason is >> probably the simplicity of Ruby's cache, excellent hardware cache >> behavior, and a good cache hit-rate. > > Not sure what you mean by this - are you saying that the call site method caches did not improve perf at all in a modified version of Ruby? I imagine he means that since Ruby already has method caches in other forms, adding call-site caches did not help in the existing implementation. But that's a one-sided view point; call site caches in JRuby, for example, would help immensely, because it would eliminate (in most cases) all method lookup *and* invocation indirection. This in turn would enable HotSpot to much more easily inline the actual code being called, where having many levels of indirection between the call site and the target method makes it much harder. Call site caches are not only about avoiding method lookup in our case...they're about making execution as straight a line as possible. - Charlie