in reply to Re: Iterating through Two Arrays. Is there a better use of memory?
in thread Iterating through Two Arrays. Is there a better use of memory?
Nitpick: O(m+n) where m>n is just O(m). The point is, the operation is of linear order in the larger number of items.
Also, this is computationally O(1), but the original post asks for memory usage, not computation. I'm not a high enough level monk to know what the memory usage of arrays vs. hashes is, but I would hazard a guess that unless you're using an embedded environment or something else with very little available memory, that at 10k items you don't need to care too much about that.
Ben
Also, this is computationally O(1), but the original post asks for memory usage, not computation. I'm not a high enough level monk to know what the memory usage of arrays vs. hashes is, but I would hazard a guess that unless you're using an embedded environment or something else with very little available memory, that at 10k items you don't need to care too much about that.
Ben
My mission: To boldy split infinitives that have never been split before!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Iterating through Two Arrays. Is there a better use of memory?
by Jeri (Scribe) on Oct 13, 2011 at 17:13 UTC | |
by AR (Friar) on Oct 13, 2011 at 17:17 UTC | |
by DentArthurDent (Monk) on Oct 13, 2011 at 17:21 UTC | |
by JavaFan (Canon) on Oct 13, 2011 at 20:34 UTC | |
Re^3: Iterating through Two Arrays. Is there a better use of memory?
by Jeri (Scribe) on Oct 13, 2011 at 17:26 UTC |
In Section
Seekers of Perl Wisdom