summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorIan C. Anderson <ian@iancanderson.com>2021-10-25 10:40:33 -0400
committerGitHub <noreply@github.com>2021-10-25 10:40:33 -0400
commite943511455acfd70dc3bd085038969a11802d688 (patch)
treec2a49aec9b1657a16ec7820976cad0a11f96cf1f /bootstraptest
parent1c0c8d5da2abc84a56ca4b66b73e0c262df0fbbe (diff)
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>
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb10
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
+}