Skip to main content
eScholarship
Open Access Publications from the University of California

Optimizing JavaScript Engines for Modern-day Workloads

  • Author(s): Kedlaya, Madhukar Nagaraja
  • Advisor(s): Hardekopf, Ben
  • et al.
Abstract

In modern times, we have seen tremendous increase in popularity and

usage of web-based applications. Applications such as presentation software

and word processors, which were traditionally considered desktop applications

are being ported to the web by compiling them to JavaScript. Since

JavaScript is the de facto language of the web, JavaScript engine

performance significantly affects the overall web application

experience. JavaScript, initially intended solely as a client-side

scripting language for web browsers, is now being used to implement

server-side web applications (node.js) that traditionally have been

written in languages like Java. Web application developers expect

"C"-like performance out of their applications. Thus, there is a need

to reevaluate the optimization strategies implemented in the modern

day engines.

Thesis statement: I propose that by using run-time and ahead-of-time

profiling and type specialization techniques it is possible to

improve the performance of JavaScript engines to cater to the needs of

modern-day workloads.

In this dissertation, we present an improved synergistic type

specialization strategy for optimized JavaScript code execution,

implemented on top of a research JavaScript engine called

MuscalietJS. Our technique combines type feedback and type inference

to reinforce and augment each other in a unique way. We then present

a novel deoptimization strategy that

enables type specialized code generation on top of typed, stack-based

virtual machines like CLR. We also describe a server-side offline

profiling technique to collect profile information for web

application which helps client JavaScript engines (running in the

browser) avoid deoptimizations and improve performance of the

applications. Finally, we describe a technique to improve the

performance of server-side JavaScript code by making use of

intelligent profile caching and two new type stability heuristics.

Main Content
Current View