Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Finding all substrings

by Dominus (Parson)
on Apr 24, 2002 at 19:34 UTC ( #161743=note: print w/replies, xml ) Need Help??


in reply to Re: Finding all substrings
in thread Finding all substrings

Says samtregar:
I found this to be 300% faster over 100,000 iterations. Not bad, but I bet we could do better!
Supposing that the original version took 10 seconds to run, then yours, 300% faster, completes and delivers the answer 20 seconds before you even enter the command that runs it. That is an impressive achievement indeed. I admire your optimization skills.

Perhaps you meant that yours was three times as fast? If so, it was 66.67% faster, not 300%.

Hope this helps.

--
Mark Dominus
Perl Paraphernalia

Replies are listed 'Best First'.
Re: Re: Finding all substrings
by samtregar (Abbot) on Apr 24, 2002 at 19:39 UTC
    Um, just reading the Benchmark output man:
    Rate original new original 7710/s -- -80% new 38610/s 401% --
    If that doesn't mean 400% faster then I guess I need more education.

    -sam

      Benchmark is telling you:
      • new is 80% faster than original
      • original is 401% slower than new
      Don't confuse "this much more" with "this much less." :-)

      Russ
      Brainbench 'Most Valuable Professional' for Perl

        The issue here has nothing to do with "less" and "more", and everything to do with units of measure. When samtregar says his routine is 400% faster, he is obviously implying a unit of measure based on rate, ie. number of executions per second. Dominus's quip assumed an inverse unit of measure based on seconds per execution. Personally, I think samtregar's assumption about units was the better one. Most people are accustomed to thinking about things in terms of rate, ie. if I say I made my script run 4x faster, there's really no confusion. If I say I made it run 75% faster, things get muddled. But once it goes over 100%, there's no question as to what is meant.
           MeowChow                                   
                       s aamecha.s a..a\u$&owag.print
Re: Re: Finding all substrings
by BUU (Prior) on Apr 25, 2002 at 02:02 UTC
    If it took 10 seconds, and was 300% faster, that would merely mean it was 3 seconds long. I think. Actually i think theyre both interchangeable

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-08-12 00:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?