Rcpp: Seamless R and C++ Integration
summary
Shows concrete numbers and working code: a plain R loop is ~400× slower than R's builtin sum, bytecode reduces that to ~40×, and an Rcpp C++ implementation reaches native speed and beats builtins further when using OpenMP. Demonstrations use Rcpp with as/wrap conversions, sourceCpp/cppFunction and RInside embedding, explain SEXP/PROTECT issues, show reference-semantics for large vectors with Rcpp::clone for copies, and export custom types and modules; examples compile and run cross-platform and integrate common C++ libraries.
AI-written summary · about
chapters (13)
- 0:00Introduction to R and C++
- 0:35Lessons from legacy computing
- 4:30Understanding the R ecosystem
- 10:22Performance trade-offs in R
- 13:45Optimizing code with Rcpp
- 17:36Integration and data exchange
- 20:58Seamless C++ setup in R
- 24:11Data handling and wrappers
- 32:07Advanced Rcpp data structures
- 38:29Advanced interoperability
- 43:21Extending Rcpp functionality
- 51:00Syntactic sugar and embedding
- 54:10Final notes and Q&A
related talks
25m"Boosting Python Numeric Computations with Dynamic C++ Integration"
29mC++ ♥ Python: from modules to hybrid applications
01h 21mAccelerating Python With C++
37mRewriting your R analysis code in Python
01h 37mTech Tutorial: Use Julia for your next scientific computing job!
43mWhat's New and Exciting in Julia
40mGet native with Cython
35mEffective Python and R collaboration
