|
|
|
|
|
by jallmann
5756 days ago
|
|
To be fair, we don't know the number of objects -- most of these 125k accesses could be lookups. But then again, if the number of objects is that small, then a hashtable strikes me as overkill. Otherwise yes, he should notch it up to a reasonable load factor. But there's no denying how atrocious the hash function is. To quote: > first and last characters of the name of the object, adds them together and mods the result by the number of buckets, which is 11 I don't know much about the name representation, but I'm guessing it's human readable ASCII. Which means your keys are confined to a very narrow range, and they'll be distributed along the same lines as the language itself (English or whatever). That means collisions up the wazoo. |
|