From time to time I need a library which can perform matrix multiplication for me. I think I have most recently used EJML, but that isn't necessarily the easiest package to use when I am working with feature vectors. Having a good package can mean the difference in waiting hours for your computations to complete. So what are the most efficient packages out there? Are there any good benchmarks to support such claims made by various packages which might exist?

2 Answers 2


Well let me give an answer since this question is a bit quiet. From the EJML website, I found this graph:

enter image description here

So according to this, EJML is best overall using pure Java code for smaller matrix and MTJ is best for large sized matrices. Again got to be careful with one of the candidates reporting, but this does give some insight into the different packages available.

  • 2
    This is the sort of answer that makes me think this site could actually work Mar 10, 2014 at 22:37

JBLAS is the equivalent of C/FORTRAN standard BLAS library and is very fast. It comes with precompiled binaries and uses the hardware as efficiently as possible, switching implementation depending on hardware type.

Another alternative is JAMA.

  • 1
    I will upvote you, however I was looking for more detail in what makes them efficient / how efficient are they compared with each other.
    – demongolem
    Feb 5, 2014 at 12:15
  • 1
    What do you mean C/Fortran standard blas? Do you mean NetBlas? (Which IIRC exists only as a referene and is built around for loops and is slow.) Do you mean Atlas which is compliled for your own system? Do you mean the highly optimised OpenBlas? Do you mean it looks up what BLAS library you have installed and provides a wrapper around that one? There is no C standard BLAS. Feb 12, 2014 at 3:10
  • I mean the original netBLAS API definition. Feb 16, 2014 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.