diff options
author | Ian C. Anderson <ian@iancanderson.com> | 2021-10-25 10:40:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 10:40:33 -0400 |
commit | e943511455acfd70dc3bd085038969a11802d688 (patch) | |
tree | c2a49aec9b1657a16ec7820976cad0a11f96cf1f /bootstraptest | |
parent | 1c0c8d5da2abc84a56ca4b66b73e0c262df0fbbe (diff) | |
download | ruby-e943511455acfd70dc3bd085038969a11802d688.tar.gz |
YJIT: Implement duphash (#5009)
`duphash` showed up in the top-20 most frequent exit ops for @jhawthorn's benchmark that renders github.com/about
The implementation was almost exactly the same as `duparray`
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 183b19c3eb..c94c710c4d 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -2268,3 +2268,13 @@ assert_equal "true", %q{ expected == events } + +# duphash +assert_equal '{:foo=>123}', %q{ + def foo + {foo: 123} + end + + foo + foo +} |