faster bcopy using duffs device (source)

Russ Poffenberger poffen at lookitthat
Sat Sep 9 06:36:46 AEST 1989


In article <5180 at portia.Stanford.EDU> stergios at Jessica.Stanford.EDU (stergios marinopoulos) writes:
>I wanted a faster bcopy, so I used duffs device as a basis for it.  In
>addition, it copies ints at a time instead of chars, and the loop is
>unrolled  a little too.  Its been working well for me today, so it has
>to be perfect right?
>
>A potential problem is the char*'s not being alligned, but I have not
>run into it.  Also, this probably will not copy strings smaller than

This will definitely NOT work on some risc machines (namely SPARC for one)
that have strict alignment requirements.

Russ



More information about the Comp.lang.c mailing list