mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add benchmarks for Range#reverse_each
This commit is contained in:
parent
66fabefa03
commit
769f53eb7e
1 changed files with 16 additions and 0 deletions
16
benchmark/range_reverse_each.yml
Normal file
16
benchmark/range_reverse_each.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
prelude: |
|
||||
rf_1 = 0..1
|
||||
rf_1k = 0..1000
|
||||
rf_1m = 0..1000000
|
||||
big = 2**1000
|
||||
rb_1 = big..big+1
|
||||
rb_1k = big..big+1000
|
||||
rb_1m = big..big+1000000
|
||||
|
||||
benchmark:
|
||||
"Fixnum 1": rf_1.reverse_each { _1 }
|
||||
"Fixnum 1K": rf_1k.reverse_each { _1 }
|
||||
"Fixnum 1M": rf_1m.reverse_each { _1 }
|
||||
"Bignum 1": rb_1.reverse_each { _1 }
|
||||
"Bignum 1K": rb_1k.reverse_each { _1 }
|
||||
"Bignum 1M": rb_1m.reverse_each { _1 }
|
Loading…
Add table
Add a link
Reference in a new issue