good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Hash references versus hashes: is there a performance hit?by philcrow (Priest) |
on Mar 06, 2007 at 20:18 UTC ( [id://603508]=note: print w/replies, xml ) | Need Help?? |
The real difference comes when you pass the hash to a sub. Then, large hashes are serialized as lists, while references are just a single scalar.
I'm not willing to guess what the performance of a simple lookup is. But, both of them have the hash the key which might be the dominant part of the process. Phil
In Section
Seekers of Perl Wisdom
|
|