http://qs1969.pair.com?node_id=18367


in reply to Shift, Pop, Unshift and Push with Impunity!

About hash table lookup. In theory, if you have infinite ammount of memory, you can approach O(1) time. As I understand all really implemented hash algorithms with finite memory will take, strictly speaking, O(n) time. There is an example of unsuccessful order of data that will make Perl's implementation of hashes to take O(n) for searching. In practice you'll hardly will be much worse than O(1).