Does anyone know how fast the get(key) function is compared to a typical binary search.
Would it be faster than a binary search on a sorted arrayList?
ie how many accesses on average till it finds the required node/ value.
Printable View
Does anyone know how fast the get(key) function is compared to a typical binary search.
Would it be faster than a binary search on a sorted arrayList?
ie how many accesses on average till it finds the required node/ value.
If the HashMap is large enough and the hash function is good, it takes an average of a single access to find an element.