Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

RE (tilly) 1: The Best Infinite Loop

by tilly (Archbishop)
on Oct 17, 2000 at 04:31 UTC ( #37068=note: print w/replies, xml ) Need Help??

in reply to The Best Infinite Loop

Well I was going to reply to this with an amusing anecdote, then I found that the relevant chapter of Code Complete is online. Here is a sample section from this classic on benchmarking.

The anecdote was that your infinite loop reminded me of the story of a team that was trying to speed up an operating system. Well they profiled and found that it spent most of its time in one loop. So they optimized the heck out of that loop - only to find no reduction in the time spent in that code.

Turns out that they had optimized the idle loop!

Oops. :-)

On an ironic note, I have heard elsewhere that even though they did not speed up the OS, it turned out that they had made it noticably more responsive to users and smoother at multi-tasking. So it turned out to be a good thing to do after all!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://37068]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2017-11-24 07:24 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (345 votes). Check out past polls.