Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

stepanov

Stepanov web page at KAI
Abstraction Penalty
LibraryMrC 3.0CW11
mathlib 1.0 12.44
powermathlib 1.0 12.44
libmoto 1.0 12.44
Elapsed time
LibraryMrC 3.0CW11
mathlib 11 198
powermathlib 11 198
libmoto 11 198

System:

Power Macintosh 8500/180 = PowerPC 604e 180MHz, 256K L2

Compilers:

CW11 = Metrowerks CodeWarrior 11 -opt all -inline all -w off -opt schedule601 -d MAC -dialect cplus
MrC = Apple MrC 3.0.1f1c8 -opt speed -inline all

Libraries:

mathlib = Apple MathLib 2.0.3
powermathlib = Apple PowerMathLib 3.0d1
libmoto = Motorola libmoto provided with MotoTools 3.0

Introduction to the Stepanov Benchmark

The purpose of the Stepanov Benchmark is to measure the performance penalty that is imposed by a C++ compiler on a program that uses the data abstraction features of C++. This penalty is called the data abstraction penalty. This benchmark was written by Alexander Stepanov, one of the original authors of the C++ Standard Template Library.

The size of the data abstraction penalty is important to C++ programmers because if it is small enough, the C++ programmer can use the data abstraction features of C++ anywhere in a program, including within computational kernels. If the data abstraction penalty is too large, the C++ programmer will be forced, for performance reasons, to remove some or all of the data abstractions from the C++ program, and hence lose the benefits of data abstraction.

The Stepanov Benchmark is a collection of 13 kernels written in C++, each performing the same computation. Kernel zero is written at a low level, using no C++ data abstraction features. The other kernels use various C++ data abstraction features, in various combinations.

The Stepanov Benchmark reports results on a kernel by kernel basis by computing the ratio of this kernel's running time with the running time of kernel zero. The Stepanov Benchmark also reports the geometric mean of the kernel results as the abstraction penalty.


Detailed results

MrC 3.0 final

test number absolute time additions/sec ratio with test 0
0 0.85sec 58.82M 1.00
1 0.85sec 58.82M 1.00
2 0.85sec 58.82M 1.00
3 0.83sec 60.00M 0.98
4 0.85sec 58.82M 1.00
5 0.85sec 58.82M 1.00
6 0.85sec 58.82M 1.00
7 0.85sec 58.82M 1.00
8 0.83sec 60.00M 0.98
9 0.87sec 57.69M 1.02
10 0.83sec 60.00M 0.98
11 0.85sec 58.82M 1.00
12 0.85sec 58.82M 1.00
mean1.00
Abstraction Penalty: 1.00

Metrowerks Codewarrior 11

test number absolute time additions/sec ratio with test 0
0 0.85sec 58.82M 1.00
1 0.85sec 58.82M 1.00
2 9.30sec 5.38M 10.94
3 7.62sec 6.56M 8.96
4 15.52sec 3.22M 18.25
5 12.97sec 3.86M 15.25
6 20.25sec 2.47M 23.82
7 17.20sec 2.91M 20.24
8 23.97sec 2.09M 28.20
9 17.18sec 2.91M 20.22
10 23.70sec 2.11M 27.88
11 21.42sec 2.33M 25.20
12 27.63sec 1.81M 32.51
mean12.44
Abstraction Penalty: 12.44


Back to MPW Home Page
Back to MPW Home Page