TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tom Duff on Duff's Device (1988)

43 pointsby dv_saysover 9 years ago

4 comments

userbinatorover 9 years ago
I wonder what programmers at the time would think of CPUs eventually being so good at handling loops that unrolling changes from an optimisation technique to be performed manually, to one that compilers might sometimes do, to an anti-optimisation:<p><a href="http:&#x2F;&#x2F;www.agner.org&#x2F;optimize&#x2F;blog&#x2F;read.php?i=142" rel="nofollow">http:&#x2F;&#x2F;www.agner.org&#x2F;optimize&#x2F;blog&#x2F;read.php?i=142</a><p><i>It is so important to economize the use of the micro-op cache that I would give the advice never to unroll loops.</i><p><a href="http:&#x2F;&#x2F;lkml.iu.edu&#x2F;hypermail&#x2F;linux&#x2F;kernel&#x2F;0008.2&#x2F;0171.html" rel="nofollow">http:&#x2F;&#x2F;lkml.iu.edu&#x2F;hypermail&#x2F;linux&#x2F;kernel&#x2F;0008.2&#x2F;0171.html</a><p><i>by eliminating all instances of Duff&#x27;s Device from the XFree86 4.0 server, the server shrunk in size by _half_ _a_ _megabyte_ (!!!), and was faster to boot</i>
评论 #10176850 未加载
评论 #10176772 未加载
CyberDildonicsover 9 years ago
Funny that he is more famous for this than for inventing Porter-Duff compositing algebra, one of the cornerstones of modern image manipulation.
评论 #10176848 未加载
protomythover 9 years ago
&quot;A second poster tried the test, but botched the implementation, proving only that with diligence it is possible to make anything run slowly.&quot;<p>This made me laugh. &quot;with diligence it is possible to make anything run slowly&quot; should be one of the truths carved into an obelisk outside every CompSci department or at least on a t-shirt.
AceJohnny2over 9 years ago
&gt; (Actually, I have another revolting way to use switches to implement interrupt driven state machines but it&#x27;s too horrid to go into.)<p>I&#x27;m really, really curious about what that code is.
评论 #10176476 未加载