Inside the switch statement

Joel C. Salomon joelcsalomon at gmail.com
Mon Jun 15 19:40:13 PDT 2009


Kagamin wrote:
> The Duff's device is said to be an optimization, but I get blunt device only 0.7% slower.

Read Duff’s post: “this loop was the bottleneck in a real-time animation
playback program”, and all the Device is doing is unwinding the loop a
few times.  Optimization comes because — on the particular system the
code was written for — the eight-times-unwound loop fit nicely into cache.

—Joel Salomon


More information about the Digitalmars-d-learn mailing list