Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!sri-spam!robert From: robert@sri-spam.UUCP Newsgroups: comp.lang.c Subject: Re: String Handling -- Incompetence of run-time libraries Message-ID: <9999@sri-spam.istc.sri.com> Date: Wed, 1-Apr-87 19:07:32 EST Article-I.D.: sri-spam.9999 Posted: Wed Apr 1 19:07:32 1987 Date-Received: Sat, 4-Apr-87 08:33:38 EST References: <15292@amdcad.UUCP> <978@ames.UUCP> <15694@sun.uucp> <9996@sri-spam.istc.sri.com> <6071@mimsy.UUCP> Reply-To: robert@sri-spam.UUCP (Robert Allen) Organization: SRI International, Menlo Park Lines: 23 Keywords: instruction set architectures, strcpy In article <6071@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >In article <9996@sri-spam.istc.sri.com> robert@sri-spam.istc.sri.com >(Robert Allen) writes: >>To further speed this up you could write it as: >> strcpy2(ss1,ss2) >> register char *ss1, *ss2; >> { >> while (*s1++ = *s2++) >> ; >> } >>thus eliminating two assignments and two local variables. > >Now these people all seem to be talking about Vaxen; I feel I must >point out the various errors here. It is clear that neither the >original someone nor Robert Allen actually compiled these to >assembly. (Use `cc -O -S' to do this.) > yes, I confess. I didn't compile the version I typed into the message, although I did confirm that it worked by coding and running an example with the *correct* variable names. Woe is me. Also, I appear to have been wrong about saving the two assignment statments also.