Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!sjsca4!news From: poffen@lookitthat (Russ Poffenberger) Newsgroups: comp.lang.c Subject: Re: faster bcopy using duffs device (source) Keywords: loop unrolling, optimize, hacks Message-ID: <1989Sep8.203646.1942@sj.ate.slb.com> Date: 8 Sep 89 20:36:46 GMT References: <5180@portia.Stanford.EDU> Reply-To: poffen@lookitthat.UUCP (Russ Poffenberger) Organization: Schlumberger ATE, San Jose, CA Lines: 13 In article <5180@portia.Stanford.EDU> stergios@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