Skip to content

Commit 769791e

Browse files
committed
Note for bsearch usage: only works on sorted array.
Thanks Eduard and Nikita. Closes #29.
1 parent d373fb6 commit 769791e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ module_eval with string: 1129.7 i/s - 1.19x slower
101101

102102
##### `Array#bsearch` vs `Array#find` [code](code/array/bsearch-vs-find.rb)
103103

104+
**WARNING:** `bsearch` ONLY works on *sorted array*. More details please see [#29](https://github.com/JuanitoFatas/fast-ruby/issues/29).
105+
104106
```
105107
$ ruby -v code/array/bsearch-vs-find.rb
106108
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]

0 commit comments

Comments
 (0)