mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 05:29:10 +02:00
10 lines
210 B
YAML
10 lines
210 B
YAML
prelude: |
|
|
first = 2**100
|
|
last = 2**1000
|
|
mid = (first + last) / 2
|
|
r = first..last
|
|
|
|
benchmark:
|
|
first: r.bsearch { |x| x >= first }
|
|
mid: r.bsearch { |x| x >= mid }
|
|
last: r.bsearch { |x| x >= last }
|