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
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
Turns out that they had optimized the idle loop!
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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||