Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^6: Question on Regex

by karlgoethebier (Curate)
on Nov 19, 2012 at 20:24 UTC ( #1004609=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Question on Regex
in thread Question on Regex

Hello, one important thing i learned in the short time i'm on PM is: there is no reason to be ashamed to ask something that i don't know or understand. So i must confess that i have a problem to interpret the output of Benchmark in the right way. I didn't use this module very much yet.

I know when i use cmpthese, the results are sorted from slow to fast. When i say $count = -10, my code runs for 10 wall clock seconds.

Then, in the rate column i can see the amount of iterations per second for each of the subs that i benchmarked - in our (first) case:

karlgoethebier 105189/s athanasius 627362/s

So i try:

Karls-Mac-mini:Desktop karl $ perl -e 'printf ("%.0f\n", 627362/105189 +);' 6

You wrote:...Which shows that sub athanasius is up to 5 times faster than sub karlgoethebier. Perhaps i have a mental block at the moment or i miss something really essential, sorry.

Thanks for advice and regards, Karl

«The Crux of the Biscuit is the Apostrophe»


Comment on Re^6: Question on Regex
Select or Download Code
Re^7: Question on Regex
by Athanasius (Prior) on Nov 20, 2012 at 02:48 UTC

    You’re quite right, I should have said “up to 6 times faster”. I was looking at the figure of 496%, and thinking “that’s almost 5,” but that figure is actually the increase in rate expressed as a percentage of the original. That is,

    (627362 - 105189) / 105189 = 4.9641 = 496%

    The problem is, that concept — the increase in rate expressed as a percentage of the original — doesn’t mean much to me. Which may be why I have such a hard time remembering it!

    i have a problem to interpret the output of Benchmark in the right way.

    Me too! :-)

    I know when i use cmpthese, the results are sorted from slow to fast.

    Exactly, that’s the main point to keep in mind.

    Athanasius <°(((><contra mundum

      Thank you. I thought something was wrong with my beer last night ;-) Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-07-14 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (255 votes), past polls