Riposte: A Trace-Driven Compiler and Parallel VM for Vector Code in R

PACT 2012, Minneapolis, MN

There is a growing utilization gap between modern hardware and modern programming languages for data analysis. Due to power and other constraints, recent processor design has sought improved performance through increased SIMD and multi-core parallelism. At the same time, high-level, dynamically typed languages for data analysis have become popular. These languages emphasize ease of use and high productivity, but have, in general, low performance and limited support for exploiting hardware parallelism.

In this paper, we describe Riposte, a new runtime for the R language, which bridges this gap. Riposte uses tracing, a technique commonly used to accelerate scalar code, to dynamically discover and extract sequences of vector operations from arbitrary R code. Once extracted, we can fuse traces to eliminate unnecessary mem- ory traffic, compile them to use hardware SIMD units, and schedule them to run across multiple cores, allowing us to fully utilize the available parallelism on modern shared-memory machines. Our evaluation shows that Riposte can run vector R code near the speed of hand-optimized C, 5–50x faster than the open source implemen- tation of R, and can also linearly scale to 32 cores for some tasks. Across 12 different workloads we achieve an overall average speed- up of over 150x without explicit programmer parallelization.


Zachary DeVito

Tableau 作者

Justin Talbot, Pat Hanrahan