JavaScript performance improvement has primarily focused on benchmark measurements. Actual website code tends to resist such improvement as a result of how JavaScript compilers process types. Although JavaScript does not support typing directly, there is an “on the fly” ad hoc typing that takes place during compilation. Based on in-depth analysis of the advanced Chrome V8 compiler, the primary roadblocks to improved performance are inherited prototype objects and method bindings. Changes in the compiler yield significant improvements with the benchmark JSBench applied to JavaScript code from actual websites.
After a helpful introduction, the second section provides details on JavaScript and on the Chrome V8 compiler, a sophisticated just-in-time (JIT) compiler associated with the Google Chrome browser. Next, the authors present the motivation for this research, followed by a detailed section on type predictability issues that focuses on prototypes and method bindings. The fifth section proposes changes to Chrome V8 to address identified typing problems. Next, the impact of these changes is considered, together with how they might affect other proprietary browsers. The results are carefully evaluated in the seventh section. The last two sections provide a summary of related work and conclusions. Indications of future work are given at various points throughout the paper.
The authors have prepared an insightful and well-written report on performance issues related to JavaScript. Developers and researchers will find much to mull over here.