Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: Fast - Compact That String

by Limbic~Region (Chancellor)
on Feb 11, 2012 at 15:43 UTC ( #953233=note: print w/replies, xml ) Need Help??


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

tobyink,
I am confused by that statement. After eliminating the subroutine overhead (inlining everything), I can encode and decode 1 million strings in under 3 seconds. When I read that yours was taking 28 seconds I didn't even bother to check it. Can you please provide your benchmark code?

Cheers - L~R

Replies are listed 'Best First'.
Re^6: Fast - Compact That String
by tobyink (Abbot) on Feb 12, 2012 at 22:07 UTC

    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/.

      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://953233]
help
Chatterbox?
erix only sees fallen angels
erix if it weren't for bad luck, I'd have no luck at all
Discipulus Windiows the OS of native americans..
[karlgoethebier]: marioroy: Next step: Write the ultimate book. "Parallel Programming With Perl. Yet Another Missing Manual" ;-)
[marioroy]: karlgoethebier I do not do Racket ball anymore. That was from gym class long ago.
[karlgoethebier]: marioroy ;Men need a challenge
Lady_Aleena remembers winning dodgeball and wonders why parents who played it will not let their kids play it.
[marioroy]: Disciplus My wife and I went on vacation. At work, I was stuck polling SNMP from 20 million devices. It would hang at 80,000. On the mist boat, hear a voice to enable grace in the design that 10x and more performance awaits.
[Lady_Aleena]: Women need challenges too karlgoethebier. 8)
[marioroy]: s/hear/heard/

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-05-29 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?