JP Camara @jpcamara.com · Jan 14

But the inline caches only improve the performance of explicit method calls. Direct method calls are related to "calldata". This "calldata" maps directly to a struct in CRuby called "rb_call_data", which contains information about the call, and a "call cache". /5

2 likes 1 replies

?

Replies

JP Camara · Jan 14

There's only one "call cache" per "call data", - when our program is compiled it can only produce "call data" structures for method calls it knows about ahead of time. "obj.my_method" gets an explicit "call cache". But for `obj.send(:my_method)`, only the "send" call gets a "call cache"! /6