mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
a63f520971
The benchmark result is below: | |compare-ruby|built-ruby| |:---------------|-----------:|---------:| |ary2.max | 38.837M| 40.830M| | | -| 1.05x| |ary10.max | 23.035M| 32.626M| | | -| 1.42x| |ary100.max | 5.490M| 11.020M| | | -| 2.01x| |ary500.max | 1.324M| 2.679M| | | -| 2.02x| |ary1000.max | 699.167k| 1.403M| | | -| 2.01x| |ary2000.max | 284.321k| 570.446k| | | -| 2.01x| |ary3000.max | 282.613k| 571.683k| | | -| 2.02x| |ary5000.max | 145.120k| 285.546k| | | -| 1.97x| |ary10000.max | 72.102k| 142.831k| | | -| 1.98x| |ary20000.max | 36.065k| 72.077k| | | -| 2.00x| |ary50000.max | 14.343k| 29.139k| | | -| 2.03x| |ary100000.max | 7.586k| 14.472k| | | -| 1.91x| |ary1000000.max | 726.915| 1.495k| | | -| 2.06x|
30 lines
875 B
YAML
30 lines
875 B
YAML
prelude: |
|
|
ary2 = 2.times.map(&:to_f).shuffle
|
|
ary10 = 10.times.map(&:to_f).shuffle
|
|
ary100 = 100.times.map(&:to_f).shuffle
|
|
ary500 = 500.times.map(&:to_f).shuffle
|
|
ary1000 = 1000.times.map(&:to_f).shuffle
|
|
ary2000 = 2500.times.map(&:to_f).shuffle
|
|
ary3000 = 2500.times.map(&:to_f).shuffle
|
|
ary5000 = 5000.times.map(&:to_f).shuffle
|
|
ary10000 = 10000.times.map(&:to_f).shuffle
|
|
ary20000 = 20000.times.map(&:to_f).shuffle
|
|
ary50000 = 50000.times.map(&:to_f).shuffle
|
|
ary100000 = 100000.times.map(&:to_f).shuffle
|
|
|
|
benchmark:
|
|
ary2.max: ary2.max
|
|
ary10.max: ary10.max
|
|
ary100.max: ary100.max
|
|
ary500.max: ary500.max
|
|
ary1000.max: ary1000.max
|
|
ary2000.max: ary2000.max
|
|
ary3000.max: ary3000.max
|
|
ary5000.max: ary5000.max
|
|
ary10000.max: ary10000.max
|
|
ary20000.max: ary20000.max
|
|
ary50000.max: ary50000.max
|
|
ary100000.max: ary100000.max
|
|
|
|
loop_count: 10000
|
|
|