Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site bunker.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!bunker!garys From: garys@bunker.UUCP (Gary M. Samuelson) Newsgroups: net.lang.c Subject: Re: Tricky way to unroll string copy loops Message-ID: <796@bunker.UUCP> Date: Tue, 9-Apr-85 14:06:54 EST Article-I.D.: bunker.796 Posted: Tue Apr 9 14:06:54 1985 Date-Received: Thu, 11-Apr-85 01:43:08 EST References: <799@u1100a.UUCP> <582@lsuc.UUCP> Organization: Bunker Ramo, Trumbull Ct Lines: 28 I would like to suggest one aesthetic improvement to Duff's Device. It would look slightly less revolting (in my opinion) if all of the case labels were at the same block level: Original: > case 0: do { *to++ = *from++; > case 7: *to++ = *from++; > ... > case 1: *to++ = *from++; > } while (--n > 0); With my proposed change: > do { > case 0: *to++ = *from++; > case 7: *to++ = *from++; > ... > case 1: *to++ = *from++; > } while (--n > 0); As I said, it's an aesthetic change, but then again, there might be a case where some compiler does something with either the 'do' or the brace which makes a difference. I'm not sure I would use it either way. Gary Samuelson ittvax!bunker!garys