arrays existing ones would probably be infrequent occurrences compared with accessing an existing employee' record for informationor updating it to reflect changes in salaryaddressand so on retail store inventoryon the other handwould not be good candidate for an ordered array because the frequent insertions and deletionsas items arrived in the store and were soldwould run slowly logarithms in this section we'll explain how logarithms are used to calculate the number of steps necessary in binary search if you're math majoryou can probably skip this section if math makes you break out in rashyou can also skip itexcept for taking long hard look at table we've seen that binary search provides significant speed increase over linear search in the number-guessing gamewith range from to maximum of seven guesses is needed to identify any number using binary searchjust as in an array of recordsseven comparisons are needed to find record with specified key value how about other rangestable shows some representative ranges and the number of comparisons needed for binary search table comparisons needed in binary search range comparisons needed , , , , , , , , , , , , notice the differences between binary search times and linear search times for very small numbers of itemsthe difference isn' dramatic searching items would take an average of five comparisons with linear search ( / and maximum of four comparisons with binary search but the more items there arethe bigger the difference with itemsthere are comparisons in linear searchbut only in binary search for , itemsthe numbers are versus and for , , itemsthey're , versus we can conclude that for all but very small arraysthe binary search is greatly superior