Daily news about using open source R for big data analysis, predictive modeling, data science, and visualization since 2008

April 24, 2017

R 3.4.0 now available

R 3.4.0, the latest release of the R programming language (codename: "You Stupid Darkness"), is now available. This is the annual major update to the R language engine, and provides improved performance for R programs. The source code was released by the R Core Team on Friday and binaries for Windows, Mac and Linux are available for download now from CRAN.

The most significant change in this release is that the JIT ('Just In Time') byte-code compiler is now enabled at level 3 by default. This means that top-level loops will be compiled before being run, and all functions will be compiled on their first or second use. Byte-compilation has been available for packages for some time, but the inclusion of this just-in-time compiler means you'll see similar performance benefits for your own R code without having to take any additional steps to compile it.

There have been various other performance improvements as well. Sorting vectors of numbers is faster (thanks to the use of the radix-sort algorithm by default). Tables with missing values compute quicker. Long strings no longer cause slowness in the str function. And the sapply function is faster when applied to arrays with dimension names.

Also on the performance front, R now will use some higher-performance BLAS routines for linear algebra operations (for example, DGEMV is now used instead of DGEMM). R falls back to a single-threaded (but higher-precision) built-in linear algebra functions when missing values are present in the data, and the check for that situation has also been sped up which should further improve performance.

For package authors using compiled C/C++/Fortran code, there is a new function to register the routines that should be exposed to other packages. Registering functions speeds up the process of calling compiled code, particularly on Windows systems. The gain is measured in the order of microseconds per call, but when these functions are called thousands or millions of times the impact can be noticeable.

This update also makes a number tweaks to the language to improve consistency, especially in corner cases. R is now more consistent in its handling of missing values when constructing tables. Some common programmer errors, like comparing a vector with a zero-length array, now generate warnings. And there have also been some accuracy improvements for extreme values in some statistical functions.

This is just a summary of the changes; check out the announcement linked below for the detailed list. As always, big thanks go to the volunteers of the R Core Group for continuing to push the boundaries of R's capabilities with each annual release and the several patches that improve it each year. (By the way, the R Foundation now accepts donations via its website. If you benefit from using R, consider contributing.)