XP is just a number | |
PerlMonks |
Re: Re:x2 Counting keys with defined or undefined elements in a hashby jsprat (Curate) |
on Jun 05, 2003 at 18:46 UTC ( [id://263453]=note: print w/replies, xml ) | Need Help?? |
I msg'd you, but you weren't around, so I'll post here.
The benchmark isn't benchmarking the giant hash - the parameter being passed to the sub is not what you think it is (which explains the amazing speed)! Just use %h directly in the sub to see the difference. Try using this modified sub by_for to show how the parameters are being passed:
It dies when the benchmark is run.
In Section
Seekers of Perl Wisdom
|
|