Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

RE: The Best Infinite Loop

by Adam (Vicar)
on Oct 17, 2000 at 02:32 UTC ( #37052=note: print w/ replies, xml ) Need Help??


in reply to The Best Infinite Loop

That's an interesting question... I wonder though if your redo really qualifies as infinite. A more 'proper' loop use of redo might be { $_++; last if ($_ == 1000); redo }
Also, it appears that you don't know (or more likely forgot) about using a negative $count with timethese() -=- you can make Benchmark run the test for x number of seconds by making $count be -x

Check out this excellent post on benchmarking for more ideas: Benchmarking Your Code Also, the perldoc for Benchmark.pm has even more good stuff.


Comment on RE: The Best Infinite Loop

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-18 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls