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 reply to Re^2: length() and the Schwartzian transform
by hazylife
in thread length() and the Schwartzian transform
by hazylife
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |