When using R, you will find that R CPU utilization is not very high, anyway, when I use R, no matter what r does the CPU utilization of the R is only hundred molecules, which leads to a very long calculation time when the computation is large, it will give an illusion (r really in the calculation?). Will my program die? )。 Today, I saw a blog introduction of the method, can't wait to try, can only say: too good! Here is my test:
Ago:
After:
As you can see, the calculation time is reduced from 247.97s (that is, 4.14min) to 11.22S,CPU utilization when the R calculation is 100%.
Implementing the above performance needs to install Openblas,blas is a standard for linear algebra operations, and it has many implementations. In R, whether explicit or implicit, we tend to perform a large number of linear algebra operations. However, the default invocation of R is often called ref BLAS, which is a very low-efficiency BLAS that only implements functionality. The business-supported revolution R is fast, and one of the reasons it's important is that it uses Intel's optimized MKL BLAS (MATLAB is also used for MKL fast). Blas has an open source implementation that is Openblas, which evolved from Gotoblas and can do it faster than Intel MKL.
Method: Download the following Baidu cloud network disk files → unzip → copy all dll files to the R installation directory under the bin x64 (sorry My computer is 64-bit, 32-bit system click the reference link in the following) folder (for example, my is: D:\R\R-3.3.1\bin\x64 , remember to save the Rblas.dll file before copying x64) →ok
Http://pan.baidu.com/s/1sl1XqkX
Reference: http://blog.csdn.net/a358463121/article/details/42713307
Openblas Download Network: https://sourceforge.net/projects/openblas/files/
This article link: http://www.cnblogs.com/homewch/p/5954177.html
Speed up R language calculation using Openblas in Windows