Boost logo

Boost :

From: Simon J. Julier (sjulier_at_[hidden])
Date: 2002-06-25 08:10:28

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.

Any suggestions would be welcome.



A=3D[=0A 4.6526e-01 5.1705e-01 2.0033e+00=0A 5.1705e-01 7.7208e-01=
   4.6114e+00=0A 2.0033e+00 4.6114e+00 =
 4.8358e+01];=0A=0AA=3DA(1:2,1:2);=0A=0AB=3D[=0A 9.9836e-01 -3.1359e-02=
=0A -3.1359e-02 4.0164e-01];=0A=0A%A=3Deye(2);=0A=0A%B=3D[1 0;0=
;=0A=0Afigure(1)=0Ahold off=0Aplot(xa,ya)=0Ahold=
%plot_handles=3Dget(handle,'Children');=0A=0A=0Afor a =3D 0:1:n=0A for b =3D=
 0 : 0.25 : 1.0=0A c =3D 2 * pi * a / n;=0A T =3D b*[cos(c) -sin(c); sin(c)=
 cos(c)];=0A C =3D sqrtm(A) * T * sqrtm(B);=0A if min(eig([A C;C'=
 B])<0)=0A eig([A C;C' B])=0A end;=0A S =3D A + B - C - C';=0A W =3D (A -=
 C) * pinv(S);=0A D =3D A - W * S * W';=0A if=
        else=0A plot(xd,yd,'--');=0A end;=0A drawnow;=0A end;=0Aend;=0A=0Afor a =
=3D0 : 0.25 : 0,=0A D =3D inv(a*inv(A) +(1-a)*inv(B));=0A [xd,yd]=3Dcovpts([=
0;0],D,40);=0A plot(xd,yd,'r');=0A drawnow;=0Aend;=0A

Boost list run by bdawes at, gregod at, cpdaniel at, john at