Do you know where your variables are? | |
PerlMonks |
Re: Merge hash into another hashby ruzam (Curate) |
on Nov 18, 2009 at 23:54 UTC ( [id://808064]=note: print w/replies, xml ) | Need Help?? |
Unless I'm mistaken, both 'keys' and 'values' will make Perl gather up all the elements of each into temporary lists before even attempting to assign them. If %source is really huge, then that could be a problem? If I thought memory use was a concern I'd walk the key values instead.
But I imagine Perl is pretty good at handling temporary lists, so I doubt looping through the keys would be as fast. Update ... and just for fun Update Again (used the wrong target in the benchmark)
In Section
Cool Uses for Perl
|
|