Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: length() and the Schwartzian transform

by Anonymous Monk
on Mar 06, 2014 at 06:06 UTC ( #1077181=note: print w/replies, xml ) Need Help??


in reply to length() and the Schwartzian transform

It seems to me that the point of the example is to show how ST works as simply as possible, NOT to show its speed or lack thereof ...
  • Comment on Re: length() and the Schwartzian transform

Replies are listed 'Best First'.
Re^2: length() and the Schwartzian transform
by hazylife (Monk) on Mar 06, 2014 at 09:33 UTC
    NOT to show its speed or lack thereof
    My 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1077181]
help
Chatterbox?
[davido]: If you ever doubt the progress made in CPU technology: I have a script that runs in 2m20s on a Core2-Duo with 8GB RAM and an SSD. On an i7-2700K, also with SSD, same script runs in 12.5s.
[davido]: That's a 2nd Gen i7, but it is OC'ed from 3.5GHz to 4.6. ...things break down for awhile following 2nd gen though; the 2nd gen i7 2700k beats my Haswell (4th gen) i7 laptop by about 30%

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-11-22 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (326 votes). Check out past polls.

    Notices?