Know Your Engines: How to Make Your JavaScript Fast

Web Performance
Location: Hall 1 A Level:
Average rating: ***..
(3.58, 12 ratings)

The main part of the talk will explain how each major JavaScript language feature is compiled and run, how fast it is compared to other operations, and what “performance faults” can make it much slower than expected. For example, reading a property (x = o.p) is implemented by compiling a bit of code to get the property value very quickly for any object with the same properties. This means that if a given line of code reads a property always from objects that look the same, it is very fast; if it works on objects with different property sets, it is usually still fast; if it works on objects that don’t have that property, it will be very slow. I will avoid details that are interesting mainly to engine implementers in favor of giving concrete, intuitive models that developers can use to predict performance and understand performance problems.

In the second, shorter part, I’ll talk about current and future work to make JavaScript go faster, and what it might mean for developers. One area is advanced research-derived optimizations, such as tracing (TraceMonkey), dynamic type profiling (Crankshaft), and type inference. These technologies have the potential to dramatically speed up programs, but they will probably work much better on programs where values usually have the same type, so developers should know something about what kinds of programs benefit. Another area is simpler, more practical additions, such as web worker threads, which enable multithreading in browser JavaScript, and typed arrays, which allow fast computation on arrays of integers, including pixel data. The main goal of this part of the talk is to give developers ideas about what new things may be possible in JavaScript in the near future.

Photo of David Mandelin

David Mandelin

Mozilla Corporation

David Mandelin manages the JavaScript engine team and Mozilla, and is also the module owner of SpiderMonkey, Firefox’s JavaScript engine. Before that, he was project leader for JaegerMonkey, the new JavaScript JIT in Firefox 4. Previously, he has done work on TraceMonkey, JavaScript performance, measurements, static analysis, miscellaneous programming language research, business web application development, and random programming.



  • ip-label
  • Compuware Corporation
  • dynaTrace
  • Keynote Systems
  • New Relic
  • Citrix Systems
  • Google
  • Apica
  • AppDynamics
  • CDNetworks
  • Cotendo
  • Dyn Inc.
  • ImmobilienScout24
  • Spil Games
  • Dyn Inc.

For information on exhibition and sponsorship opportunities at the conference, contact Gloria Lombardo at

View a list of Velocity Europe contacts