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).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Shift, Pop, Unshift and Push with Impunity!
by Dominus (Parson) on Jan 05, 2001 at 07:46 UTC | |
by tilly (Archbishop) on Jan 05, 2001 at 15:50 UTC |
In Section
Meditations