Idle Loop Optimized
seebs writes "Every so often someone makes a joke about optimizing the idle loop, but this article actually does it. " It's about time too- that process has been eating up clock cycles for to long.
← Back to Stories (view on slashdot.org)
Show some restraint. It isn't necessary to publish EVERY LAST APRIL FOOLS JOKE found on the Internet. Give it a rest already!
-Charles
Learning HOW to think is more important than learning WHAT to think.
There was a similar one years ago about optimizing the idle loop of 4bsd Unix on the VAX. Turns out there was a real reason to make the change, a bug report was filed and the optimization was implemented. The "broken" idle loop did some computation and then checked to see if there was other work to do. If the computation got faster, then the latency in noticing that new work arrived got lower. Lower latency is usually a goot thing. Note that the techniques expoused in this article might even increase the latency by doing more work in each iteration.