Re^6: Question on Regex

by karlgoethebier (Abbot)
 on Nov 19, 2012 at 20:24 UTC Need Help??

in reply to Re^5: 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»

Replies are listed 'Best First'.
Re^7: Question on Regex
by Athanasius (Archbishop) 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»

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1004609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-05-26 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?

No recent polls found