From e943511455acfd70dc3bd085038969a11802d688 Mon Sep 17 00:00:00 2001 From: "Ian C. Anderson" Date: Mon, 25 Oct 2021 10:40:33 -0400 Subject: 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 Co-authored-by: John Hawthorn --- bootstraptest/test_yjit.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bootstraptest') 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 +} -- cgit v1.2.3