JSMeter: comparing the behavior of JavaScript benchmarks with real web applications

Paruj Ratanaworabhan, Benjamin Livshits, Benjamin G. Zorn

2010 · 138 citations · 14 references

TL;DR

JavaScript is ubiquitous in web applications, and recent browser wars have focused on performance claims derived from benchmark suites such as SunSpider and V8. This study evaluates the runtime behavior of JavaScript in commercial web sites and compares it with that of standard benchmarks. The authors measured two aspects of JavaScript execution—function and code characteristics, and event‑driven handlers—to assess differences. Benchmarks fail to capture key real‑world behaviors such as event‑driven execution, instruction‑mix similarity, cold‑code dominance, and short functions, suggesting the need for more representative benchmarks.

Abstract

JavaScript is widely used in web-based applications and is increasingly 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. In this paper we evaluate the behavior of JavaScript web applications from commercial web sites and compare this behavior with the benchmarks. We measure two specific areas of JavaScript runtime behavior: 1) functions and code and 2) events and handlers. We find that the benchmarks are not representative of many real web sites and that conclusions reached from measuring the benchmarks may be misleading. Specific common behaviors of real web sites that are underem-phasized in the benchmarks include event-driven execution, instruction mix similarity, cold-code dominance, and the prevalence of short functions. We hope our results will convince the JavaScript community to develop and adopt benchmarks that are more representative of real web applications.

References

14