You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the code generated by erubi makes use of opt_aref_with, and on the benchmark recently added by @noahgibbs on speed.yjit.org, this causes us to exit early, and only get 5% coverage. This instruction seems to be used to index hashes with string literals. It's not super common, but it also shouldn't be very difficult to implement, so may be nice to have.
Another thing to note is Ruby won't generate opt_aref_with when frozen_string_literal is true
for example:
This generates opt_aref_with:
def foo
h = { "hi" => "ok" }
h["hi"]
end
This does not:
# frozen_string_literal: true
def foo
h = { "hi" => "ok" }
h["hi"]
end
So if this change is merged: Shopify/yjit-bench#63
it won't generate opt_aref_with anymore which maybe makes optimizing this instruction less important.
It looks like the code generated by erubi makes use of
opt_aref_with
, and on the benchmark recently added by @noahgibbs on speed.yjit.org, this causes us to exit early, and only get 5% coverage. This instruction seems to be used to index hashes with string literals. It's not super common, but it also shouldn't be very difficult to implement, so may be nice to have.Top exits on the
erubi
bechmark:The text was updated successfully, but these errors were encountered: