Speeding up R with C/C++/Fortran

Abstract

R is a great language for statisticians because of its interactivity, simple syntax and access to multiple libraries produced by the community. These features also allow rapid prototyping, testing and debugging of new methods; however, the short implementation time is often outweighed by long execution times. To produce more efficient code and libraries, R possess simple interfaces to other languages such as C++ and Fortran, enabling efficient runtime with limited additional implementation. Indeed, executing the core calculations of a method in a compiled language can produce speed-ups in the order of 10-100x and up to 1000x in some cases. We will consider a few examples to showcase the increase in efficiency of compiled code compared to interpreted R code and build a simple R package from scratch to exhibit the simplicity of the process. The second part of the presentation will be of the workshop type: if you wish to follow along, you will need to have the R packages “Rcpp” and “devtools” installed.

Date
Dec 2, 2020 10:30 AM — 11:30 AM
Event
Student Seminar
Location
Remote
Avatar
Simon Fontaine

PhD Student in Statistics