From owner-freebsd-arch Sun Oct 31 14:51:47 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 59A0B14DC8 for ; Sun, 31 Oct 1999 14:51:33 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id XAA22210 for ; Sun, 31 Oct 1999 23:51:30 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id XAA67774 for freebsd-arch@freebsd.org; Sun, 31 Oct 1999 23:51:29 +0100 (MET) Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id 16E4214E9B for ; Sun, 31 Oct 1999 14:50:52 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (root@d60-025.leach.ucdavis.edu [169.237.60.25]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id OAA15453; Sun, 31 Oct 1999 14:50:50 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id OAA50062; Sun, 31 Oct 1999 14:50:49 -0800 (PST) (envelope-from obrien) Date: Sun, 31 Oct 1999 14:50:49 -0800 From: "David O'Brien" To: "Cc@FreeBSD.ORG"@FreeBSD.ORG:Dmitrij Tejblum , freebsd-arch@freebsd.org Subject: Re: stpcpy() Message-ID: <19991031145049.A90745@dragon.nuxi.com> Reply-To: obrien@NUXI.com References: <199910302228.CAA03763@tejblum.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from bde@zeta.org.au on Sun, Oct 31, 1999 at 02:07:26PM +1100 X-Operating-System: FreeBSD 4.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Oct 31, 1999 at 02:07:26PM +1100, Bruce Evans wrote: > > Good stpcpy() could double performance in some cases. You would touch a > > symbol once where you previously touched it twice. > stpcpy() could halve performance in some cases (when the compiler inlines > and combines strcpy() and strlen() but doesn't do anything special with > stpcpy(), and inlining is good). Bruce hit the nail right on the head -- people are making assumptions with out know what their compiler is doing. Also, strcpy() and strlen() could easily be highly optimized ASM routines that together are still faster than a C stpcpy(). > > It actually may matter in some text-processing applications. Yes, BUT one should only use these non-standard functions AFTER they've actually done some profiling and see where the program is REALLY spending their time. -- -- David (obrien@NUXI.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message