in reply to Re: Re: Re: Looking up a hash by value
in thread Looking up a hash by value
Thanks, I understand what you mean now.
Interestingly, this is slightly slower than reverse for hashes with few key/value pairs (25), while ... each performs faster on my system for hashes with more than 1500 key/value pairs.
Of course, I'm using simple data (integers) as my keys and values, so this benchmark may not test real world performance.
The main reason I would use reverse is that I find it makes the code more readable.
|
|---|