Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java matrix-multiplication (FAST)

I have to multiply 2 (most of the times) sparse matrix. Those matrix are pretty bit (about 10k*10k) and i've a two Xeon Quad core and just one thread for this job?

is there any fast library for multi-thread moltiplication? any other advice?

like image 734
BigG Avatar asked Jan 15 '10 19:01

BigG


3 Answers

I would try Colt, from CERN. It's a bit old now, but still provides excellent libraries for what you are trying.

For parallel processing, try the newer Parallel Colt.

like image 124
Adam Goode Avatar answered Sep 26 '22 22:09

Adam Goode


With due respect to Colt and Parallel Colt, they are not very fast. If you insist on using Java and expect fast numerical computations, use JBLAS. JBLAS uses ATLAS. I have compiled JBLAS to use multithreaded ATLAS - it does not do this by default. You would need to change a few configure options. However even single threaded JBLAS is faster than multithreaded Colt and Parallel Colt. I tested Colt, Parallel Colt, JAMA and JBLAS. JBLAS is the best by a country mile.

Colt and Parallel Colt are very slow. So is JAMA. The best library in Java for such things is JBLAS.

like image 32
Hamaad Shah Avatar answered Sep 25 '22 22:09

Hamaad Shah


Do it on a GPU? http://www.nvidia.com/object/io_1254288141829.html

like image 28
Hamish Grubijan Avatar answered Sep 22 '22 22:09

Hamish Grubijan