BLACK LIVES MATTER
Join us and donate
The premier IDE for R
RStudio anywhere using a web browser
Put Shiny applications online
Shiny, R Markdown, Tidyverse and more
Do, share, teach and learn data science
An easy way to access R packages
Let us host your Shiny applications
The premier software bundle for data science teams
RStudio for the Enterprise
Connect data scientists with decision makers
Control and distribute packages
RStudio Public Package Manager
RStudio Server Pro
RStudio Package Manager
How to profile and optimize code using profvis, a new package for exploring profiling data.
August 18, 2016
As programming languages go, R has a bit of a reputation for being slow. This reputation is mostly undeserved, and it hinges on the fact that R’s copy-on-modify semantics make its performance characteristics different from other many other languages. That said, even the most expert R programmers often write code that could be faster. The first step to making code faster is to find which parts are slow. This isn’t an easy task. Sometimes we have no idea what parts of code are expensive, and even when we do have intuitions about it, those intuitions can be wrong. After the slow parts of code have been identified, one can move on to the next step: speeding up that code.
In this talk we’ll show how to profile and optimize code using profvis, a new package for exploring profiling data. Profvis provides a graphical interface that makes it easy to spot which pieces of code are expensive. We will also discuss why some common operations in R may be surprisingly slow, and how they can be sped up.
Winston is a software engineer at RStudio. He holds a Ph.D. in psychology from Northwestern University and is the author of R Graphics Cookbook, published by O’Reilly Media.