Technical Report Results

Technical Report TR706:
Just-in-time Acceleration of JavaScript

Uday Pitambare, Arun Chauhan, Saurabh Malviya
(Feb 2013), 14 pages
JavaScript has seen tremendous growth in popularity driven by increasingly interactive web sites and sophis- ticated web interfaces. However, the performance of JavaScript continues to be a hurdle in using it for tasks that are computationally intensive, such as gaming, sim- ulations, and visualization. JavaScript has also been slow to exploit the available parallelism on modern comput- ers. Speci cally, it is not currently easy to exploit GPG- PUs within JavaScript. A part of the reason is that the low-level interface demanded for GPGPU programming is often not approachable by JavaScript programmers. In this paper, we present a novel approach that provides a mechanism to accelerate portions of JavaScript pro- grams without requiring the programmers to learn new syntax or low-level APIs. We achieve that through an embedded DSL used to specify GPGPU computations. We have designed a JavaScript library, and an accompa- nying Firefox extension, that work together to compile the embedded DSL just-in-time using the LLVM backend for generating PTX. The compiled code is cached to min- imize the compilation overhead. Our evaluation of the system using a micro-benchmark, two applications ker- nels, and an application benchmark demonstrates that our approach imposes minimal performance overhead, while providing an easy GPGPU programming interface to JavaScript programmers.

Available as:
  • PDF (330 KBytes)