Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Oct 1999 14:07:26 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
Cc:        obrien@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: stpcpy() 
Message-ID:  <Pine.BSF.4.10.9910311404140.11004-100000@alphplex.bde.org>
In-Reply-To: <199910302228.CAA03763@tejblum.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 31 Oct 1999, Dmitrij Tejblum wrote:

> "David O'Brien" wrote:
> > Why is it so useful and "improves" performance so much??  
> 
> Good stpcpy() could double performance in some cases. You would touch a 
> symbol once where you previously touched it twice. It actually may 
> matter in some text-processing applications.

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).  In practice, gcc seems to only inline
strlen().

Bruce





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?Pine.BSF.4.10.9910311404140.11004-100000>