Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!mcnc!decvax!decwrl!pyramid!prls!philabs!micomvax!ray From: ray@micomvax.UUCP (Ray Dunn) Newsgroups: comp.lang.c Subject: Re: strcpy Message-ID: <981@micomvax.UUCP> Date: 12 Apr 88 22:33:42 GMT References: <12622@brl-adm.ARPA> <18516@think.UUCP> <1988Mar27.171450.14256@sq.uucp> <1988Mar31.183321.4740@sq.uucp> Reply-To: ray@micomvax.UUCP (Ray Dunn) Organization: Philips Electronics Ltd. (TDS - Montreal) St. Laurent QC, Canada Lines: 19 In article <1988Mar31.183321.4740@sq.uucp> msb@sq.UUCP (Mark Brader) writes: >Regarding: >> > If a machine has a fast instruction that >> > does a search for a byte and a fast block move instruction, it would >> > probably be best for strcpy to be written.... Hmm. I fell foul to this practice in MicroSoft 4.0 string library routines fairly recently. strchr (at least, probably others) unbeknownst to me does this to determine the length of the string prior to doing the character search. ....Now, to optimize my file operations, I used a 32K buffer, and was using strchr to find the line endings! Can you say S.L.O.W. I wonder how much software is out there just now running s.l.o.w.l.y because of this practice? Ray Dunn. ..{philabs,mnetor}!micomvax!ray