This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: improving performance of basic_string modification functions


On Wed, Aug 22, 2001 at 10:44:59PM -0700, Benjamin Kosnik wrote:
> I would prefer if the testsuite was augmented to deal with basic 
> performance analysis issues before too much stuff like this gets checked in.
> 
> Any thoughts on how to do this?

I did a little analysis of 'basic' applications that are using strings heavily
with 3.0.1 (release) and found that only two functions of the API are important:

calls   %

156	32   	std::string::append(std::string const&, unsigned, unsigned)
1304509	7   	std::string::size() const

Imho, by testing these two functions you cover already a lot.

The % gives how important they are (you could use that as a weight to calculate
a benchmark number).  The 'calls' shows relative number of times they are
called.  Obviously it is not the application that is calling these functions
directly, normally - it's just the best 'interface' I could find to simulate
'normal' usage.

-- 
Carlo Wood <carlo@alinoe.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]