diff options
author | Lourens Naudé <lourens@bearmetal.eu> | 2020-01-08 00:19:26 +0000 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-01-08 18:09:52 +0900 |
commit | 592d7ceeebb380d197876400efdb18a27d5192b5 (patch) | |
tree | 05b5b891a1984bc9f0bb601d6f19342038d4b799 /benchmark | |
parent | 13f4f07f215ca66cc727c75e0c3d77389c261e14 (diff) |
Speeds up fallback to Hash#default_proc in rb_hash_aref by removing a method call
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2821
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/hash_defaults.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmark/hash_defaults.yml b/benchmark/hash_defaults.yml new file mode 100644 index 0000000000..833f10e1c7 --- /dev/null +++ b/benchmark/hash_defaults.yml @@ -0,0 +1,6 @@ +prelude: | + h = Hash.new { :foo } +benchmark: + default_aref: h[1] + default_method: h.default(1) +loop_count: 1000000 |