|C++ Compiler Benchmarking solosnake@solosnake._without_this_.fsnet.co.uk (solosnake) (2002-10-13)|
|Re: C++ Compiler Benchmarking email@example.com (Hannes Liesen) (2002-10-18)|
|From:||"Hannes Liesen" <firstname.lastname@example.org>|
|Date:||18 Oct 2002 23:42:16 -0400|
|Keywords:||C++, benchmarks, comment|
|Posted-Date:||18 Oct 2002 23:42:16 EDT|
> Does anyone know of where I can find some portable C++ code that could
> be used to benchmark one compiler against another with regards to the
> quality of its speed optimisations?
There is this Drystone test from Reinhold P Weicker.
It's actually a C-Benchmark, but there are modifications
around that enfore C++ compliers to build
objects rather than structures internally.
12 years ago I made excessive tests with it,
AIX PowerPc, NEC SX 3, AIX 370, VAX/VMS and Ultrix, Sparc etc,
INTEL MS Dos, Xenix SCO
and the absolute winner was IBM's
Powerchip, especially when the comperatively
low clock rate was taken into consideration.
Ok, only the SX3 was 40% faster (20MHZ against 250 or so on the main CPU).
The benchmark is of course not vectorizable, if it
had been the NEC SX would have won by several 1000%.
Whenever possible I used GNU C/C++.
GNU's code was actually always at least as fast as the code of the
native compilers. Only IBM's AIX Risc compiler's code was superior by
far (so about 50%), when a certain option was used, which made
functions below a certain amount of code bytes inline automatically. I
still cannot understand the bad benchmark conclusions on AIX and the
AIX compiler from some computer magazines in those days. On emails
they answered, that the IBM compiler knows this benchmark, and is
optimized for this benchmark, but for nothing else. But I could
observe the same superiority with any arbitrary CPU exhausting C
software, e.g. raytracers.
When this Drystone test (plain C) with 'objects rather than
structures' DEFINE was compiled with GCC++ or any other C++ compiler,
the benchmark lost so about 50%-75% performance normally on all
platforms, but IBM's Risc C++ compiler just lost a few %, again, only
with this magic Option. Unfortunately I cannot find the source code
anymore. I had added some more OO operations,but it did not harm the
AIX's performance in contrast to the other compilers, again only when
this option was used. Manual inline statements done by me did not help
other platforms to get closer to the AIX compiler. For several years
I always dreamed to get a Job, where I could work with an IBM SP2.
The original Weicker source code should be still on the internet
[I would think that it would be tricky to develop useful C++ benchmarks
because different people use the language in such different ways. -John]
Return to the
Search the comp.compilers archives again.