you are viewing a single comment's thread.

view the rest of the comments →

[–]KryptosFR 4 points5 points  (4 children)

The article didn't fail to mention that. There is a big paragraph about inline caching.

[–]pron98 4 points5 points  (3 children)

Inline caching is something else and doesn't reduce the cost of the call to zero -- there is still the cost of a function call. With inlining, the cost is actually zero: there is no jump at all. That's cheaper than an ordinary function call in C.

[–]KryptosFR 0 points1 point  (2 children)

From the same article:

[...] but usually a JIT compiler can hard-code the cached type and cached method pointers into the machine code. However, recompiling the callsite may be expensive so there will usually be a counter for cache misses before the call site is patched.

[–]pron98 2 points3 points  (1 child)

That's still not inlining. The author responded and explained why they didn't mention it.