good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Does the reference of a scalar more efficient than scalar?by ccn (Vicar) |
on Dec 11, 2008 at 09:24 UTC ( [id://729642]=note: print w/replies, xml ) | Need Help?? |
As said in Perl Cookbook
Yes, several megabytes contained in the returned value is a good reason to use references. Your benchmark proves it. However if the length of returned scalar is not big than you get valuable overhead on dereferencing.
In Section
Seekers of Perl Wisdom
|
|