|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2007-11-20 13:56:01
Sohail Somani wrote:
> On Tue, 20 Nov 2007 15:24:42 +0000, nisha kannookadan wrote:
>
>> Hi everybody
>>
>> Im a quite new boost user and I wonder, why C++ Program is so slow.
>>
>> I wrote a program, and I have the same program in Matlab, I expected
>> that my C++ version is much faster, but its not.
>>
>> I use matrices, vectors, matrix- and vector proxies. Do some solving
>> and compute calculations with prod, element_div, etc..
>>
>> Is boost in general slower than matlab, should I use something else?
>>
>> Id be real happy about any help.
>
> Matlab uses some highly optimized matrix operations libraries (BLAS/
> LAPACK for example.) I assume you use Boost uBLAS which is quite a
> good library but it has nowhere near the amount of investment put
> into it as
> does Matlab.
uBlas has bindings for various BLAS libraries in the sandbox which speed
things up quite a bit. Also if your program has debug settings turned on
then uBlas will be *very* slow, it's only when you turn on all your
compiler's optimisations (and maybe define NDEBUG) that uBlas gets up to
speed.
There is also a dedicated mailing for uBlas users will will likely be more
helpful than this one :-)
HTH, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk