good chemistry is complicated, and a little bit messy LW 

PerlMonks 
Re^3: mathematical proofby JavaFan (Canon) 
on Feb 03, 2009 at 08:00 UTC ( #740911=note: print w/ replies, xml )  Need Help?? 
For example consider a hash in the worst case scenario, where you have just done a hash split. Then every element has been moved once. Half of them were around for the previous hash split, so have been around twice.That assumes a hash split only after Ω(n) new inserts. But then in the worst case scenario where all elements hash to the same bucket, searching for a key has to walk a list, making the search linear instead of O(1). I know hashes have changed in the past so that the linked list hanging of each bucket cannot grow unbounded. But that means that worst case, you either have hash splits in o(n) (lowercase o), or search times that aren't O(1). Any "mathematical proof" will have to look at the C code and consider how often hash splits occur worst case, and how long the linked lists can be.
In Section
Seekers of Perl Wisdom

