Re: new linear algebra library and memory management improvement
Posted by
Klaus Spanderen on
URL: http://quantlib.414.s1.nabble.com/new-linear-algebra-library-and-memory-management-improvement-tp11167p11168.html
Hi
I've checked the second solution by defining
typedef boost::numeric::ublas::vector<double> Array;
typedef boost::numeric::ublas::matrix<double> Matrix;
and porting the rest of the QuantLib. (This breaks quite a lot interfaces
within the QL;-). The resulting performance is disappointing. Using normal
compiler switches the ublas version is 20% slower than the original
implementation. When using more aggressive compiler optimization switches the
ublas can only match the original performance but is not faster.
FYI: I got 10% more performance for the test-suite without changing interfaces
by using the slightly improved version of array.hpp and matrix.hpp enclosed
in the attachment (I haven't checked this version too much;-)
cheers
Klaus
On Thursday 22 June 2006 5:07 pm, François du Vignaud wrote:
> Hi all,
> I'm hesitating between two solutions for the uBlas migration : Embedding
> all uBlas code in the existing Array and Matrix classes. The main advantage
> is that no other file would be altered. However it seems really tedious to
> expose all the nice features of uBlas using this architecture. Replacing
> completely all Array and Matrix in the QuantLib code.
> I tend to prefer the second solution because it is much neater in my
> opinion even if it is not the simplest one in the short run. I'm aware that
> uBlas is not the most efficient linear algebra library available, however
> profiling shows that it is sufficient for the LFM case (sheer linera
> algebra operations accounts for a small part of the computation time). More
> complex operations can be performed using ATLAS through uBlas bindings. Any
> suggestion/advice are more than welcome.
> Thanks for your attention,
> best regards,
> François