RcppArmadillo: Accelerating R with high-performance C++ linear algebra
By Dirk Eddelbuettel, Conrad Sanderson. Computational Statistics & Data Analysis, 2014
490 citations recorded by the source corpus.
The R statistical environment and language has demonstrated particular strengths for interactive development of statistical algorithms, as well as data modelling and visualisation. Its current implementation has an interpreter at its core which may result in a performance penalty in comparison to directly executing user algorithms in the native machine code of the host CPU. In contrast, the C++ language has no built-in visualisation capabilities, handling of linear algebra or even basic statistical algorithms; however, user programs are converted to high-performance machine code, ahead of execution. A new method avoids possible speed penalties in R by using the Rcpp extension package in conjunction with the Armadillo C++ matrix library. In addition to the inherent performance advantages of compiled code, Armadillo provides an easy-to-use template-based meta-programming framework, allowing the automatic pooling of several linear algebra operations into one, which in turn can lead to further speedups. With the aid of Rcpp and Armadillo, conversion of linear algebra centred algorithms from R to C++ becomes straightforward. The algorithms retain the overall structure as well as readability, all while maintaining a bidirectional link with the host R environment. Empirical timing comparisons of R and C++ implementations of a Kalman filtering algorithm indicate a speedup of several orders of magnitude.
Subfields: Artificial Intelligence, Information Systems and Management, Management Science and Operations Research
View Paper: https://www.semanticscholar.org/paper/c44ebb438b173b98bf6bbef2ed75147a4f5bdc5e
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Gregor Kastner
- Dustin Tingley
- Brandon M Stewart
- Margaret E. Roberts
- Ryan R. Curtin
- Ian G. McHale
- Georgi N. Boshnakov
- Tarak Kharrat
In Information Systems and Management
- Gregor Kastner
- Ryan R. Curtin
- Ian G. McHale
- Margaret E. Roberts
- Brandon M Stewart
- Georgi N. Boshnakov
- Dustin Tingley
- Tarak Kharrat
In Management Science and Operations Research
- Gregor Kastner
- Ryan R. Curtin
- Ian G. McHale
- Margaret E. Roberts
- Brandon M Stewart
- Georgi N. Boshnakov
- Dustin Tingley
- Tarak Kharrat
Citations in the corpus
- stm: An R Package for Structural Topic Models (2019, methodology): “Because this optimization step is the main bottleneck for performance we code the objective function, gradient in the fast C++ library Armadillo using the RcppArmadillo package (Eddelbuettel and Sanderson 2014).”
- A bivariate Weibull count model for forecasting association football scores (2017, methodology): “To speed up the computations, where necessary, parts of the code were implemented in C++ using the infrastructure provided by Eddelbuettel and Sanderson (2014).”
- Sparse Bayesian time-varying covariance estimation in many dimensions (2016, methodology): “In this paper, we tackle the computational burden by using high-performance C and C++ code, interfaced to R via RcppArmadillo (Eddelbuettel and Sanderson 2014).”
- Armadillo: a template-based C++ library for linear algebra (2016, methodology): “Armadillo is used as a base for other open source projects, such as MLPACK, a C++ library for machine learning and pattern recognition [2], and RcppArmadillo, a bridge between the R language and C++ in order to speed up computations [5].”
- Spatial capture–recapture with partial identity: An application to camera traps (2018, methodology): “An R package to fit the SPIM is available at github.com/benaug/SPIM which includes code to fit the models in either R or Rcpp and RcppArmadillo [Eddelbuettel and François (2011), Eddelbuettel and Sanderson (2014)], which is considerably faster.”