Date: Fri, 29 Oct 1999 23:46:55 -0700 From: "David O'Brien" <obrien@freebsd.org> To: Randell Jesup <rjesup@wgate.com> Cc: freebsd-arch@freebsd.org Subject: Re: stpcpy() Message-ID: <19991029234654.B89583@dragon.nuxi.com> In-Reply-To: <ybug0yui2g9.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net>; from rjesup@wgate.com on Fri, Oct 29, 1999 at 03:58:14PM %2B0000 References: <19991029132257.A535@holly.calldei.com> <19991029111352.A87934@dragon.nuxi.com> <19991029132257.A535@holly.calldei.com> <199910291829.MAA89401@harmony.village.org> <19991029134549.B535@holly.calldei.com> <ybug0yui2g9.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 29, 1999 at 03:58:14PM +0000, Randell Jesup wrote: > stpcpy() (the issue in this case) is something I've seen in > compiler's C libraries since the late 80's/early 90's (if I remember > correctly), if I remember correctly. Quite honestly, it's useful ... > It's handy and improves performance for the cases where it's Why is it so useful and "improves" performance so much?? I'll only believe this when I see some perf traces. Strings don't tend to be very long ( < 256). Thus an c*O(n), where c = (2 + 1 function call) doesn't sound like a big savings. Especially in the face of portability. I really think 99% of the programs using stpcpy() for "speed" reasons would spend 99% of their time elsewhere if p=strchr(strcpy(d,s), '\0'); were used. -- -- David (obrien@NUXI.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991029234654.B89583>