"JSMeter: Characterizing Real-World Behavior..."
summary
JSMeter instruments IE’s JavaScript engine to count bytecodes and traces of real user sessions on top sites and compares those to SunSpider/V8 benchmarks. Results show real apps load megabytes of code but execute many short functions (~50 bytecodes/call), with the top 100–150 functions accounting for ~80% of execution. Heap is dominated by strings and script functions, events fire hundreds–thousands of times, and adding ~2 MB of cold code slows some benchmarks 4.5×. The instrumentation and session-driven traces expose gaps between benchmarks and real-world behavior.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:15Background
- 1:25Why Measure JavaScript?
- 4:37Source level instrumentation
- 6:49Understanding JavaScript Behavior
- 7:37Code Behavior
- 8:04Total Bytes of JavaScript Source
- 9:27Static Unique Functions Executed
- 10:44Bytecodes / Call
- 11:59Fraction of Code Executed
- 12:52Hot Function Distribution
- 14:20Object Allocation Behavior
- 14:37Total Bytes Allocated
- 18:26Live Heap Over Time (gmail)
- 20:15Live Heap over Time (ebay)
- 21:572 Search Websites, 2 Architectures
- 23:43Event Handlers in JavaScript
- 24:26Total Events Handled
- 25:03Median Bytecodes / Event Handled
- 26:12Cold-code Experiment
- 26:44Performance Impact of Cold Code
- 28:41Impact of Benchmarks
- 29:53Conclusions
- 31:02Additional Resources
related talks
45m2022 State Of JS: A Performance Profile
41mMeasuring the Moving Parts of User Experience in Java/.NET applications
38mYour benchmark may not guide a real application performance
39mMicro Benchmarks
16mJavaScript & Metaperformance
34mUnderstanding JavaScript Performance
41mBrowser Internals for JS Devs
52mOverboard.js
