All posts tagged with optimization

< Back to list.

Linear vs. Binary Search

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.