Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best matrix multiplication algorithm? [closed]

What is the best matrix multiplication algorithm? What means 'the best'for me? It means the fastest and ready for todays machines.

Please give links to pseudocode if you can.

like image 583
guest Avatar asked Dec 15 '10 22:12

guest


1 Answers

BLAS is the best ready-to-use efficient matrix multiplication library. There are many different implementation. Here is a benchmark I made for some implementations on a MacBook Pro with dual-core Intel Core 2 Duo 2.66 GHz :

  • gotoBLAS2 (open-source) : https://www.tacc.utexas.edu/research-development/tacc-software/gotoblas2
  • ATLAS (open-source) : http://math-atlas.sourceforge.net/
  • Accelerate.framework (Apple) : http://developer.apple.com/performance/accelerateframework.html
  • a non-optimized, but portable, implementation that I called 'vanilla' (from the GSL)

alt text

There are also other commercial implementations that I didn't test here :

  • MKL (Intel) : http://software.intel.com/en-us/articles/intel-mkl/
  • ACML (AMD) : http://developer.amd.com/cpu/Libraries/acml/Pages/default.aspx
like image 194
Antonin Portelli Avatar answered Oct 11 '22 13:10

Antonin Portelli