Boost logo

Boost :

From: Benedikt Weber (weber_at_[hidden])
Date: 2002-06-25 16:20:48


> >
> > CW8:
> > prod (matrix, matrix)
> > C array
> > elapsed: 0.14 s, 406.674 Mflops
> > c_matrix safe
> > elapsed: 3.435 s, 16.5748 Mflops
> > c_matrix fast
> > elapsed: 3.405 s, 16.7208 Mflops
> > matrix<unbounded_array> safe
> > elapsed: 6.509 s, 8.74702 Mflops
> > matrix<unbounded_array> fast
> > elapsed: 6.58 s, 8.65264 Mflops
> > matrix<std::vector> safe
> > elapsed: 12.197 s, 4.6679 Mflops
> > matrix<std::vector> fast
> > elapsed: 12.168 s, 4.67902 Mflops
>
> Please check, whether the preprocessor symbol NDEBUG is defined. NDEBUG in
> turn defines NUMERICS_USE_ET, which enables uBLAS release mode. uBLAS
> distinguishes debug mode (size conformance checks enabled, expression
> templates disabled) and release mode (size conformance checks disabled,
> expression templates enabled).

Good guess. Makes quite a difference!! Not quite as good a MSVC, but good
enough. This is the problem of IDEs, where you just click the options. Make
sure to include a note in the documentation!!

CW8, NDEBUG:
bench_3
prod (matrix, matrix)
C array
elapsed: 0.14 s, 406.674 Mflops
c_matrix safe
elapsed: 0.301 s, 189.151 Mflops
c_matrix fast
elapsed: 0.18 s, 316.302 Mflops
matrix<unbounded_array> safe
elapsed: 0.391 s, 145.612 Mflops
matrix<unbounded_array> fast
elapsed: 0.22 s, 258.793 Mflops
matrix<std::vector> safe
elapsed: 0.401 s, 141.981 Mflops
matrix<std::vector> fast
elapsed: 0.22 s, 258.793 Mflops

> > compare this with MSVC6:
> > bench_3
> > prod (matrix, matrix)
> > C array
> > elapsed: 0.311 s, 183.069 Mflops
> > c_matrix safe
> > elapsed: 0.19 s, 299.655 Mflops
> > c_matrix fast
> > elapsed: 0.17 s, 334.908 Mflops
> > matrix<unbounded_array> safe
> > elapsed: 0.171 s, 332.949 Mflops
> > matrix<unbounded_array> fast
> > elapsed: 0.17 s, 334.908 Mflops
> > matrix<std::vector> safe
> > elapsed: 0.21 s, 271.116 Mflops
> > matrix<std::vector> fast
> > elapsed: 0.171 s, 332.949 Mflops
> >


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk