This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Benchmarking (was Re: [RFC] Moving apart SGI extensions)
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 29 Dec 2001 18:52:11 -0500
- Subject: Benchmarking (was Re: [RFC] Moving apart SGI extensions)
On Thu, Dec 27, 2001 at 10:46:46AM +0100, Paolo Carlini wrote:
> (I volunteer to work next on the benchmarking framework but I will need some
> help for this... Phil?)
The closest I got to doing any sort of benchmarking for libstdc++-v3 was
hacking around with mkcheck.in, and the timing code wasn't even mine,
I think. :-)
My initial thoughts were to have a Stopwatch class in testsuite_hooks.h.
Such a class (whatever its name) is a common extension in many commercial C++
libraries, especially when platform-specific timing routines are possible.
Stopwatch ticker;
....
ticker.start();
a_string_instance.push_back (half a billion characters);
ticker.stop();
double clock_ticks = ticker.elapsed();
etc, etc.
The Stepanov tests also use some kind of timer. I seem to have mislaid
my copy of the source code, however. There used to be something in the repo:
acorn 80% locate -i stepa
/home/pme/Repositories/GCC/gcc/gcc/testsuite/g++.old-deja/g++.other/Attic/stepanov_v1p2.C,v
acorn 81%
But I'm sure he's constantly tweaking the tests, so that old copy probably
wouldn't help us much anyhow.
(I wonder if we can't use gprof to our advantage somehow. We need something
to analyze time spent in code blocks, gprof's raison d'etre is analyzing time
spent in code blocks, hmmm. I have no idea how to automate this, though.)
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams