I'm looking for instances in the core python 2.x that uses the binary search algorithm. Do you have any quick pointers where to look ?
Asked
Active
Viewed 153 times
1 Answers
2
The bisect module uses a binary search. Here's a link to the source code: http://hg.python.org/cpython/file/2.7/Lib/bisect.py
Most of the rest of the Python core uses either hash tables or linear searches.
Raymond Hettinger
- 199,887
- 59
- 344
- 454