From dde010c97432de8ac2336eeeb4f6b99daf832b61 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Mon, 15 Nov 2021 10:32:39 +0900 Subject: [PATCH] add benchmark/array_sample.yml ``` ruby_2_6 ruby_2_7 ruby_3_0 master modified ary.sample 32.113M 30.146M 11.162M 10.539M 26.620M i/s - 64.882M times in 2.020428s 2.152296s 5.812981s 6.156398s 2.437325s ary.sample(2) 9.420M 8.987M 7.500M 6.973M 7.191M i/s - 25.170M times in 2.672085s 2.800616s 3.355896s 3.609534s 3.500108s ``` ``` ruby_2_6: ruby 2.6.7p150 (2020-12-09 revision 67888) [x86_64-linux] ruby_2_7: ruby 2.7.3p140 (2020-12-09 revision 9b884df6dd) [x86_64-linux] ruby_3_0: ruby 3.0.3p150 (2021-11-06 revision 6d540c1b98) [x86_64-linux] master: ruby 3.1.0dev (2021-11-13T20:48:57Z master fc456adc6a) [x86_64-linux] modified: ruby 3.1.0dev (2021-11-15T01:12:51Z mandatory_only_bui.. b0228446db) [x86_64-linux] ``` --- benchmark/array_sample.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 benchmark/array_sample.yml diff --git a/benchmark/array_sample.yml b/benchmark/array_sample.yml new file mode 100644 index 0000000000..4449ffd0e0 --- /dev/null +++ b/benchmark/array_sample.yml @@ -0,0 +1,5 @@ + +prelude: ary = (1..10_000).to_a +benchmark: + - ary.sample + - ary.sample(2)