2 ms·
Well inlining this way is an optimisation which the compiler may or may not opt to apply, even after adding inlining hints. By manually inlining it they're intr
by masklinn 12y ago
Well inlining this way is an optimisation which the compiler may or may not opt to apply, even after adding inlining hints. By manually inlining it they're introducing a little bit of trivial redundancy but I guess they can be certain there will be no indirect call.
Either that, or they never considered the compiler would most likely inline it.
Oddly enough, they do it for string comparisons: https://www.omniref.com/ruby/2.1.4/files/vm_insnhelper.c#line=860 https://www.omniref.com/ruby/2.1.4/files/vm_insnhelper.c#lin...