| Jeff Abrahamson on Tue, 4 Feb 2003 18:51:07 -0500 |
|
I've been looking at matrix packages. Looks like Math::Matrix is the
one to use, but it's not very mature. Worse, performance is
aweful.
I tried the following comparison with newmat (a C++ library) compiled
without optimization. I loaded a 500 x 500 matrix with random values
and then computed the first eleven powers (a^2, a^3, ..., a^11). The
profile of the two is
C++: 0 seconds to load, 15 seconds to multiply
perl: 1 second to load, ---
(600 seconds later, the perl version still hadn't finished, so I tried
just a single multiplication: 161 seconds)
Has anyone here tried doing anything with matrix multiplication in
perl? Based on the above, it doesn't seem like a reasonable thing to
do. I was ready for a factor of two speed hit, but not two orders of
magnitude.
--
Jeff
Jeff Abrahamson <http://www.purple.com/jeff/>
GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B
Attachment:
pgpARSRNI4aBN.pgp
|
|