in reply to Re: length() and the Schwartzian transform
in thread length() and the Schwartzian transform
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