Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference betwen Microsoft R Open (MRO) and R?

Tags:

r

I'm really want to know what is the main different betwen MRO and R. Then i found information that MRO is faster than R because it has multithreading.

Perfomance benchmark from mran.microsoft.com

i'm really interesting, so i want to test it by myself. First, i am install MRO + MKL, then i will run some script code in MRO and R then calculate the time.

here's my example (matrix multiplication) code:

start.time <- Sys.time()

d <- numeric(5); 
res <- replicate(5, {for(i in 1:3500){d[i] <- print(i)} ; d})
rex=res*res^0.6*res^-1
rex

end.time <- Sys.time()
time.taken <- end.time - start.time
time.taken

But the time result is not different (nearly same). i try another calculation like gwr (500 data), read and write all SHP data, but got same result. anybody know why the result isnt different? or my code isn't complicated enough to test the difference?, if so, can you give me some example?

like image 978
Galang Re Avatar asked Aug 11 '16 07:08

Galang Re


People also ask

What is MRO R?

Microsoft R Open is the enhanced distribution of R from Microsoft Corporation. It is a complete open source platform for statistical analysis and data science. The current version, Microsoft R Open 4.0.

Why use Microsoft R open?

When you use Microsoft R Open, you retain the full functionality of a CRAN distribution and have access to all available libraries and development environments like RStudio or Jupyter. Microsoft states that anywhere you use CRAN, you can use Microsoft R Open.

What is R in Microsoft?

Microsoft R Open is a complete open source platform for statistical analysis and data science, which is free to download and use. The current version, Microsoft R Open 3.5. 1, is based on (and 100% compatible with) the statistical language, R-3.5.

How do I install Microsoft R Open and Microsoft R server?

Download the Microsoft R Open installer. Change to the directory where you downloaded the Microsoft R Open installer bundle. Follow the installer's onscreen prompts. To enable the optional multi-threaded performance for Microsoft R Open, select the MKL installation option and accept the end-user license agreement.


1 Answers

Three differences:

  • MRO comes with Intel MKL as the backend for linear algebra operations (BLAS nad LAPACK), while base R (for Windows) ships an unoptimized replacement of BLAS and LAPACK which will run much slower. This impacts things like matrix multiplications, solving linear systems, eigenvalues, and such (search for BLAS benchmarks), but not loops or models like decision trees. If platforms other than windows it won't make a difference, because then R will link to the system's default BLAS (typically MKL or OpenBLAS depending on the specific OS).
  • MRO has its own CRAN mirror, so it will lag behind on updates to packages and will likely be slower to downloaded packages from there. This can be disabled if you know what you're doing. For some packages (particularly dealing with multi-threading) they might offer some non-default configurations too.
  • MRO will auto-generate a default initialization script for R sessions which prints annoying messages and changes some configuration options such as where to download repositories from.

Tip: it's possible to get the same optimized BLAS and LAPACK libraries (e.g. MKL, OpenBLAS) in the default R install for windows by substituting the .dll files (Rblas.dll and Rlapack.dll) with the correct .dll, which can be taken from the same MRO install or from NumPy's windows builds (something like openblas.dll and openblas.lib, the former of which should be copied twice and renamed).

like image 155
anymous.asker Avatar answered Nov 15 '22 20:11

anymous.asker