Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
On Thursday of last week I gave a short informal talk to Stat Bytes, the CMU Statistics department‘s twice a month computing seminar.
Quick tricks for faster R code: Profiling to Parallelism
Abstract:
I will present a grab bag of tricks to speed up your R code. Topics will include: installing an optimized BLAS, how to profile your R code to find which parts are slow, replacing slow code with inline C/C++, and running code in parallel on multiple cores. My running example will be fitting a 2PL IRT model with a hand coded MCMC sampler. The idea is to start with naive, pedagogically clear code and end up with fast, production quality code.
The slides are here. Code is here.
This was an informal talk. If you would like to dig into these topics more, some more references:
- Any of Dirk Eddelbuettel‘s talks, especially:
- Introduction to High-Performance Computing with R (Essentially a three-hour version of the Stat Bytes talk, but done much better! FWIW I found it after I gave the talk…)
- Rcpp by Examples (More info about Rcpp)
- RcppArmadillo: Accelerating R with C++ Linear Algebra (More info about C++ matrix stuff)
- CRAN Task View: High-Performance and Parallel Computing with R
- This gives an up to date overview about all things HPC and R. Give it a read to figure out what it happening.
- Note that this CRAN view is curated by by Dr. Eddelbuettel.
- StackOverflow has a whole section on R. Great for asking questions.
- R-bloggers.com is a useful way to follow a bunch of R stuff.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.