diff options
author | Koichi Sasada <ko1@atdot.net> | 2021-11-15 10:32:39 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2021-11-15 15:58:56 +0900 |
commit | dde010c97432de8ac2336eeeb4f6b99daf832b61 (patch) | |
tree | 608a38a00847ba84bd2f639cf8ea6220359c2f2d /benchmark/array_sample.yml | |
parent | a24eeee5567a14841b37d9a3428e14e4f3c45c07 (diff) | |
download | ruby-dde010c97432de8ac2336eeeb4f6b99daf832b61.tar.gz |
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]
```
Diffstat (limited to 'benchmark/array_sample.yml')
-rw-r--r-- | benchmark/array_sample.yml | 5 |
1 files changed, 5 insertions, 0 deletions
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) |