Which is faster, Hash lookup or Binary search?
问题 When given a static set of objects (static in the sense that once loaded it seldom if ever changes) into which repeated concurrent lookups are needed with optimal performance, which is better, a HashMap or an array with a binary search using some custom comparator? Is the answer a function of object or struct type? Hash and/or Equal function performance? Hash uniqueness? List size? Hashset size/set size? The size of the set that I'm looking at can be anywhere from 500k to 10m - incase that