in reply to "Just use a hash": An overworked mantra?
But just because hash key lookups/increments are O(1) operations, that doesn't make them computationally cheap.
......
An array lookup is also O(1), but it turns out it's a much computationally cheaper task to perform these array operations.
......
An array lookup is also O(1), but it turns out it's a much computationally cheaper task to perform these array operations.
not correct
Hash is not O(1).
Also, this example of 0..999 integers looks too artifical to me, and it is too obvious to use an array here, so - for me - it does not deserve to even start the discussion, in the first place :)
I do appreciate good English of the original post, however, which I, personally, do not possess
:) :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: "Just use a hash": An overworked mantra?
by davido (Cardinal) on Dec 23, 2011 at 19:19 UTC | |
by vkon (Curate) on Dec 23, 2011 at 20:52 UTC | |
by BrowserUk (Patriarch) on Dec 23, 2011 at 21:34 UTC | |
by vkon (Curate) on Dec 24, 2011 at 21:20 UTC | |
by JavaFan (Canon) on Dec 25, 2011 at 09:58 UTC | |
by BrowserUk (Patriarch) on Dec 24, 2011 at 22:08 UTC | |
by Anonymous Monk on Dec 24, 2011 at 12:38 UTC | |
by vkon (Curate) on Dec 24, 2011 at 21:11 UTC | |
by Anonymous Monk on Dec 24, 2011 at 21:25 UTC |
In Section
Meditations