Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^5: Inconsistent Results with Benchmark

by benwills (Sexton)
on Dec 08, 2014 at 23:44 UTC ( [id://1109662]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Inconsistent Results with Benchmark
in thread Inconsistent Results with Benchmark

I learned that the hard way the other day. Since I don't need "exactly-the-same" results from my tests, I now normalize them and do a character count to make sure they're not too far off from each other. For what I'm doing, and at this stage of my process, that's perfectly fine.

I'm also finding, with the constant back and forth between code and running a benchmark, a want for some other features in the Benchmark module. I wrote some stuff that makes the process faster and easier. At the end of this project, I might clean it up and get it up here.

  • Comment on Re^5: Inconsistent Results with Benchmark

Replies are listed 'Best First'.
Re^6: Inconsistent Results with Benchmark
by flexvault (Monsignor) on Dec 09, 2014 at 18:52 UTC

    benwills,

      Since I don't need "exactly-the-same" results from my tests...
    But you do!

    You use 'benchmark' in your testing environment to see which sequence of Perl declarations and statements produce the *best* result. You determine the meaning of *best*, but if the results are almost, you're missing the value of 'benchmark'.

    For example, you may be testing the use of an array or a hash within different subroutines, but the final result ( whatever you determine is the result ) must be the same. You may determine that the subroutines produce a file, and that file must be the exact same for all the different subroutines you 'benchmark'.

    Humans ( including programmers ) don't have the exactness of computers and that's why we need a great script like 'benchmark' to run our different scripts hundreds/thousands/millions of times to give us the best sequence.

    Almost isn't the same as equal!

    Regards...Ed

    "Well done is better than well said." - Benjamin Franklin

      I almost always firmly agree with you. But this is one of those times when "close" is fine at certain steps because there are multiple layers of analysis with the final result able to be produced in a number of ways due to some small overlaps in the text analysis.

      If you're curious, I can describe in more detail. A good analogy might be "how much should you clean up before the maid comes?"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found