Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^6: Fast - Compact That String

by tobyink (Abbot)
on Feb 12, 2012 at 22:07 UTC ( #953361=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Fast - Compact That String
in thread Fast - Compact That String

The code I checked was the version posted, which did not inline subs. Obviously, inlining subs will speed up all the versions.

My version averages about 27 seconds for a million strings on my computer which is a fairly low-powered netbook, several years old. Versus Re^3: Fast - Compact That String which averaged about 30 seconds for a million strings, on the same computer.

Scripts I tested, including input data are available at http://buzzword.org.uk/2012/faster/.


Comment on Re^6: Fast - Compact That String
Re^7: Fast - Compact That String
by Limbic~Region (Chancellor) on Feb 13, 2012 at 18:25 UTC
    tobyink,
    Thanks. Typically when you Benchmark things, you eliminate un-necessary IO once you prove each method is producing correct results. Also, using wall clock time is fine but since any given run can vary wildly, Benchmark is a more accurate method. I doubt I will have any cycles to set this up as describe above on my machine soon but if I do, I will post the results. Thanks again.

    Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://953361]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-12-19 13:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (83 votes), past polls