Linear vs. Binary Search

Posted: May 1, 2010

Linear vs. Binary Search

Pretty interesting: "If you need to search through a sorted array of integers and performance is really, really important, use linear search if your array is below around 64 elements in size, binary search if it's above." — I usually reach for a hash map even for tiny things.