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