in reply to Re^2: Counting keys with defined or undefined elements in a hash (behaviour of values())
in thread Counting keys with defined or undefined elements in a hash
Right, but I thought that using each didn't create a new list. But slapping a quick Benchmark together I see that keys is nearly 3x faster than each, and values is more than twice as fast as keys ... that totally blows my understanding of the process. And here I've been favoring each over keys or values on the grounds that it used less memory and was faster ... man have I been wrong!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Counting keys with defined or undefined elements in a hash (behaviour of values())
by Aristotle (Chancellor) on Jun 07, 2003 at 02:04 UTC | |
by Oberon (Monk) on Jun 07, 2003 at 02:18 UTC | |
by Aristotle (Chancellor) on Jun 07, 2003 at 02:27 UTC | |
by Oberon (Monk) on Jun 07, 2003 at 02:34 UTC | |
by Aristotle (Chancellor) on Jun 07, 2003 at 10:17 UTC | |
|