Re: Duff's Device




"Hallvard B Furuseth" <h.b.furuseth@xxxxxxxxxxx> wrote in message
news:hbf.20060928qwu6@xxxxxxxxxxxxxxxx
Anyone know why Duff's device is usually written
like this (snip) instead of this? (snip)

Yes.

This is his original post:
http://groups.google.com/group/net.lang.c/msg/66008138e07aa94c?hl=en

This is another post from him with clarifications to various questions from
individuals on c.l.c:
http://groups.google.com/group/comp.lang.c/msg/bb78298175c42411?hl=en

From the original post, he (indirectly) states that the design of Duff's
Device in C was the direct result of his understanding of how to generate
efficient unrolled loops in assembly language for the VAX. At least, that
is the one thing other than Duff's Device that you should get from his
message...


FYI, others have pointed out Simon Tatham's "Coroutines in C":
http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html

Protothreads is also based on a similar mechanism:
http://www.sics.se/~adam/pt/


Rod Pemberton


.



Relevant Pages

  • Re: Duffs Device
    ... like this (snip) instead of this? ... This is his original post: ... This is another post from him with clarifications to various questions from ... | machines but it's too horrid to go into.) ...
    (comp.lang.c)
  • Re: Black-drop - is it real?
    ... Still amazed at what I can see with the scope, ... no idea why) is the one showing the trees. ... I believ that I can see it in the picture I mentioned in the original post. ...
    (sci.astro.amateur)
  • Re: The Middle Ground.
    ... Are we reading the same newsgroup? ... for posterity as a monument to airheads everywhere". ... I notice you did not put up your original post, which, on reflection, ...
    (talk.origins)
  • Re: The Middle Ground.
    ... Are we reading the same newsgroup? ... USENET quoting customs as a monument to airheads everywhere". ... I notice you did not put up your original post, which, on reflection, ...
    (talk.origins)
  • Re: [OT] Re: whats the best hash function?
    ... > [snip 14 lines of code for hash function] ... > None needed since I said nothing that demands an apology. ... > the original post that I would not have replied as I did. ... posted a reply to a post about what is the best hash function by ...
    (comp.lang.c)