summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-16 22:14:56 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-16 23:06:41 +0900
commit382d3a4516a8177acbd23e8f87e766e38cce36a8 (patch)
tree62d7c47e823141e39a9720d4a90d9590cbb894d7 /benchmark
parente61e9bcfb27580ae52b46fc7ca49c38f8fdeb8cd (diff)
Improve Enumerable#tally performance
Iteration per second (i/s) | |compare-ruby|built-ruby| |:------|-----------:|---------:| |tally | 52.814| 114.936| | | -| 2.18x|
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4278
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/enum_tally.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmark/enum_tally.yml b/benchmark/enum_tally.yml
new file mode 100644
index 0000000000..edd2e040a0
--- /dev/null
+++ b/benchmark/enum_tally.yml
@@ -0,0 +1,4 @@
+prelude: |
+ list = ("aaa".."zzz").to_a*10
+benchmark:
+ tally: list.tally