зеркало из https://github.com/github/ruby.git
17 строки
405 B
YAML
17 строки
405 B
YAML
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 }
|