Microsoft Research
Microsoft Research Year 2009 Peer-reviewed
Web Security · Privacy

JSMeter: Characterizing Real-World Behavior of JavaScript Programs

Paruj Ratanaworabhan Benjamin Livshits David Simmons Benjamin Zorn
2009
Publication year
Microsoft Research
Venue
Peer-reviewed
Type

Problem

JavaScript is widely used in web-based applications and is increasing popular with developers. So-called ”browser wars” in recent years have focused on JavaScript performance, specifically claiming comparative results based on benchmark suites such as SunSpider and V8.

Approach

In this paper we evaluate the behavior of JavaScript web applications from commercial websites and compare this behavior with the benchmarks. We measure three specific areas of JavaScript runtime behavior: 1) functions and code; 2) heap-allocated objects and data; 3) events and handlers.

Results

We find that the benchmarks are not representative of many real websites and that conclusions reached from measuring the benchmarks may be misleading. Specific examples of such misleading conclusions include the following: that web applications have many loops, that non-string objects in web applications are extremely short-lived, and that web applications handle few events. We hope our results will convince the JavaScript community to develop and adopt benchmarks that are more representative of real web applications.

Cite this paper — BibTeX
@TechReport{jsmeter09tr,
  title = "JSMeter: Characterizing Real-World Behavior of JavaScript Programs",
  author = "Paruj Ratanaworabhan and Benjamin Livshits and David Simmons and Benjamin Zorn",
  year = "2009",
  month = dec,
  institution = "Microsoft Research",
  number = "MSR-TR-2009-173",
}
Copied