And still O(1) is not reachable, unless each element resolve a unique key ;-)
Man, this is *so* wrong. First of all, the above statement is not for hashes in general. Even if a billion elements hash to the same key, you at most have to search a billion elements. And a billion differs from 1 only by a constant - so that's O(1). Second, it's especially not true in 5.8.2 because it will increase the hash size (which leads to a different hash function) when the chains get too large.
Next time, could you please get your facts straight before posting FUD?
Abigail
In reply to Re: A short meditation about hash search performance
by Abigail-II
in thread A short meditation about hash search performance
by pg
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |