Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Re: Conditional idiom : "if X equals Y or Z" ?? - benchmark

by George_Sherston (Vicar)
on Jun 12, 2002 at 13:23 UTC ( [id://173807]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Conditional idiom : "if X equals Y or Z" ?? - benchmark
in thread Conditional idiom : "if X equals Y or Z" ??

Yes, you're quite right - if I were going to use those conditionals more than a few times in any given script I'd set up the hashes once only and spread the overhead. This was more about satisfying my curiosity than about optimisation - in the spirit of that curiosity, here are the results with any hashes involved set once only:
10000 trials of abigail (494.672ms total), 49us/trial 10000 trials of broquaint (93.071s total), 9.307ms/trial 10000 trials of esper (533.643ms total), 53us/trial 10000 trials of ferrency (547.466ms total), 54us/trial 10000 trials of george_sherston1 (654.023ms total), 65us/trial 10000 trials of george_sherston2 (837.320ms total), 83us/trial 10000 trials of george_sherston3 (715.834ms total), 71us/trial 10000 trials of samtregar (1.022s total), 102us/trial


§ George Sherston
  • Comment on Re: Re: Re: Conditional idiom : "if X equals Y or Z" ?? - benchmark
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found