Boost logo

Boost :

From: Joerg Walter (jhr.walter_at_[hidden])
Date: 2002-06-25 14:09:03


----- Original Message -----
From: "Simon J. Julier" <sjulier_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, June 25, 2002 3:10 PM
Subject: [boost] uBLAS gcc performance question

> Does anybody know a "good" set of command line options which should be
used
> to compile uBLAS? I compiled the benchmarks using cygwin gcc 3.1, running
> under Win2k with the "-O2" option. I see a significant difference in
> performance. The last test from bench1, multiplying 100x100 matrices
> together, gives the following results:
>
> C array
> elapsed: 0.06 s, 94.8906 Mflops
> c_matrix safe
> elapsed: 0.541 s, 10.5239 Mflops
> c_matrix fast
> elapsed: 0.54 s, 10.5434 Mflops
> matrix<bounded_array> safe
> elapsed: 2.324 s, 2.44984 Mflops
> matrix<bounded_array> fast
> elapsed: 2.333 s, 2.44039 Mflops
> matrix<unbounded_array> safe
> elapsed: 2.444 s, 2.32956 Mflops
> matrix<unbounded_array> fast
> elapsed: 2.463 s, 2.31159 Mflops
> matrix<std::vector> safe
> elapsed: 2.474 s, 2.30131 Mflops
> matrix<std::vector> fast
> elapsed: 2.493 s, 2.28377 Mflops
>
> The absolute values of the Mflops reflect the fact that I'm using a slow
> computer (Pentium II, 333MHz). However, the ratio of the Mflops is fairly
> consistent across all of the tests.

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).

Regards

Joerg

P.S.: Yes I know, this could be the first FAQ ;-)

[snip]


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