On Monday, 20 May 2013 at 7:39 PM, SASADA Koichi wrote:
> Is it huge performance bottleneck? I think branch on inline cache should be removed
> 
> 

This helps a lot when Ruby programs are starting up because the full class hierarchy does not need to be traversed as often.

I'll rewrite the guard to be branch free and see if there is any performance improvement.

> I prefer `st_' related name. But not strong opinion.
I disagree because they are unrelated data structures.
 
> One more:
> 
> if (LIKELY(GET_METHOD_STATE_VERSION() == ci->vmstat &&
> RCLASS_EXT(klass)->seq == ci->seq &&
> klass == ci->klass)) {
> 
> should be:
> 
> if (LIKELY(GET_METHOD_STATE_VERSION() == ci->vmstat &&
> klass == ci->klass &&
> RCLASS_EXT(klass)->seq == ci->seq) {
> 
> 

I don't think the order of checks matters, except for maybe performance reasons. I'll experiment with making this branch free instead.