Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP
Path: utzoo!watmath!atbowler
From: atbowler@watmath.UUCP (Alan T. Bowler [SDG])
Newsgroups: net.lang.c
Subject: Re: String copy idiom.
Message-ID: <11899@watmath.UUCP>
Date: Mon, 11-Mar-85 20:20:37 EST
Article-I.D.: watmath.11899
Posted: Mon Mar 11 20:20:37 1985
Date-Received: Tue, 12-Mar-85 00:00:09 EST
References: <7044@watdaisy.UUCP> <3448@alice.UUCP> <464@petsd.UUCP>
Reply-To: atbowler@watmath.UUCP (Alan T. Bowler [SDG])
Organization: U of Waterloo, Ontario
Lines: 11
Summary: 

Actually my favourite string copy idiom is
     strcpy(s, t);
On most machines this generates a smaller sequence, and I can frequently
count on the C implementor having supplied a code sequence,
(possibly written in assembler) that has been optimized for the particular
machine.  At worst if performance is a real problem, and the implementor
didn't, I can write my own assembler routine once for this machine,
rather than having to find all the places I coded my own string copy.
   On most large machines I know there are character vector instructions
that will allow implementation of a string copy that is faster than
any sequence I can code in C.