4 ms·
The author might not have even chosen an inefficient implementation. For smal sets of data, arrays can easily be faster at search and insertion than hash table
by bunderbunder 13y ago
The author might not have even chosen an inefficient implementation. For smal sets of data, arrays can easily be faster at search and insertion than hash tables, particularly if the hash function or collision resolution scheme is inefficient.
X having a higher growth rate than Y does not mean that Y is unconditionally faster. It means that there exists some problem size n such that Y is faster than X for all problems larger than n. Below that value, all those terms that big-O notation ignores are still significant performance factors.