Re: [ojAlgo-user] New SVD-implementation
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <and...@ma...> - 2008-01-03 08:19:27
|
New comparison between the ojAlgo SVD implementation and Jama's. ojAlgo is now up to x35 faster than Jama! One important difference between these two implementations is that when Jama is done decomposing the two singular vector matrices are fully (explicitly) calculated. With the ojAlgo version they are only half done and are being calculated/completed in separate threads. This is similar to how the QR decomposition (both Jama and ojAlgo) behaves (except for the multi-threading), The Q matrix of the QR decomposition is not explicitly calculated during the decomposition algorithm. It is constructed when you ask for it. With the ojAlgo SVD the two singular vector matrices are always calculated but in separate threads. When/if you want to access them you may have to wait for them to finish... /Anders On 6 dec 2007, at 17.11, Anders Peterson wrote: > Just ran the tests now (on my iMac desktop computer). > > 1000x1000 > Jama: 54,040ms > ojAlgo: 186,578ms Now they run at roughly the same speed.. > 10,000x100 > Jama: 6,985ms > ojAlgo: 2,945ms ojAlgo is now x10 faster. > 100,000x100 > Jama: 225,812ms > ojAlgo: 39,411ms ojAlgo is now x35 faster. > 100,000x10 > Jama: 2,317ms > ojAlgo: 312ms ojAlgo is now x4 faster. > On 6 dec 2007, at 16.04, Jacob Martin wrote: > >> Sounds really good! Can you please send the actual times for >> these matrices? >> >> Were they random integer/real/complex? >> >> -----Original Message----- >>> From: Anders Peterson <an...@op...> >> >> Date: Thu, 6 Dec 2007 12:37:09 >> To:"'oja...@li...'" <ojalgo- >> us...@li...> >> Subject: Re: [ojAlgo-user] New SVD-implementation >> >> >> Compared to Jama (highly preliminary) >> >> 1,000x1,000: Jama is 3-4 times faster >> 100,000x100: ojAlgo is 5-6 times faster >> >> Actually I'm quite surprised about this. I didn't expect ojAlgo to be >> faster than Jama in any case. The ojAlgo-SVD is a very high-level >> implementation (look at the source code, it's very simple). I guess >> that means the underlying code is efficient. >> >> Jama is "more correct" since ojAlgo does not yet order the singular >> values in the usual way (and even leaves negative values). This will >> of course some how be addressed. >> >> ojAlgo-SVD uses Jacobi rotations because that will allow a multi- >> threaded algorithm. The algorithm is not yet multi-threaded. When it >> is; I expect it will be much faster with large matrices (provided >> there is more than one CPU available). >> >> /Anders >> >> On 5 dec 2007, at 10.09, Anders Peterson wrote: >> >>> Is anyone interested in testing the new SVD-algorithm that will be >>> included in the next release? >>> >>> It's already in CVS... In particular I'd like it if someone could >>> help me test the ComplexNumber version - it can handle BigDecimal, >>> ComplexNumber and double. >>> >>> The plan is to release the next/new version some time soon after >>> New Year. >>> >>> /Anders >>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> ---- >> SF.Net email is sponsored by: The Future of Linux Business White >> Paper >> from Novell. From the desktop to the data center, Linux is going >> mainstream. Let it simplify your IT future. >> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> --------------------------------------------------------------------- >> ---- >> SF.Net email is sponsored by: The Future of Linux Business White >> Paper >> from Novell. From the desktop to the data center, Linux is going >> mainstream. Let it simplify your IT future. >> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > |