R with MKL on Windows 10
Following up on my previous post, a commenter on Reddit asked to see a comparison with Microsoft R Open using multithreaded Intel MKL:
Microsoft R Open 3.2.5 Default CRAN mirror snapshot taken on 2016-05-01 The enhanced R distribution from Microsoft Visit https://mran.microsoft.com/ for information about additional features. Multithreaded BLAS/LAPACK libraries detected. Using 4 cores for math algorithms.
RcppEigen, RcppArmadillo & RcppGSL were all installed from MRAN as binary packages. As expected, MKL outperforms GotoBLAS:
lm benchmark for n = 1650 and p = 875: nrep = 20 user system elapsed 1908.28 27.55 1870.58 test relative elapsed user.self sys.self 3 LDLt 1.000 4.61 4.44 0.18 7 QR 1.386 6.39 6.12 0.25 8 LLt 1.460 6.73 6.42 0.32 1 lm.fit 1.631 7.52 7.40 0.08 9 arma 2.206 10.17 37.87 2.70 4 GESDD 2.560 11.80 43.82 2.86 6 SymmEig 5.514 25.42 25.14 0.26 2 PivQR 9.857 45.44 25.26 20.15 5 SVD 188.666 869.75 868.87 0.42 10 GSL 191.262 881.72 881.45 0.27
There are none of the multi-threading issues that I observed in the previous benchmark. Elapsed time for lm.fit improves from 18.11 to 7.52, arma improves from 90.03 to 10.17, and GESDD improves from 90.77 to 11.80 seconds (in comparison to default libRblas). Compared with single-threaded SurviveGotoBLAS, MKL gives a 3x speedup for RcppArmadillo and GESDD. The other methods all perform roughly the same, since they do not rely on the BLAS library.