Don't ask to ask, just ask | |
PerlMonks |
Re^2: length() and the Schwartzian transformby hazylife (Monk) |
on Mar 06, 2014 at 09:33 UTC ( [id://1077195]=note: print w/replies, xml ) | Need Help?? |
NOT to show its speed or lack thereofMy main issue with that example is not that it's slow, but that it's misleading. For string scalars, Perl's length returns a value that has already been calculated (and cached) elsewhere. It's just a dumb "accessor method" for that internally stored value, which makes caching it pointless.
In Section
Seekers of Perl Wisdom
|
|