Today, I tested the performance of SVD function (because it is important for my work now) in OpenCV 2.3.1(http://sourceforge.net/projects/opencvlibrary/), Armadillo 2.4.4 (http://arma.sourceforge.net/download.html), Eigen 3.0.5(http://eigen.tuxfamily.org/) libraries and Matlab 2010b on my laptop, which runs a Windows 7 system. I used Visual Studio 2010 IDE for OpenCV, Armadillo and Eigen libraries (there are some details in configuration with them, it was time comsuming). In the test, I used a NxM matrix and called svd function in all the libraries and matlab’s svd function.
For the first test N=1000, M=1000, and the results were very suprised (due to the information from a same test on Linux: http://nghiaho.com/?p=954):
OpenCV took 12 secs, Armadillo took 12 secs, Eigen took 52 secs and Matlab: only 3 secs.
For the second test: N=10000, M = 1200, the results were: OpenCV took 140 secs, good bye Armadillo (I don’t know why), also say good bye to Eigen (Runtime error because the program could not allocate dynamically the big matrix), and Matlab took 6 secs. The third test with N=30000 and M=1200, Matlab took only 16 secs and OpenCV need 380 secs. I admired you, matlab. I also found some interesting things: Windows C++ program that used these libraries could not use multi core CPU like matlab (Why? Because VS IDE could not generate Windows programs that exploit multi cores architecture easily now – I am not sure). And the second thing I noted that matlab used much more memory (larger than 1GB in the case N=30000 and M=1200) than C++ programs. After this test, I come back to Matlab and I can conclude that: Matlab is the champion.