~/talk

How much performance can you get out of Javascript?

Talkat Codemotion Milan 2017 · 2017-11-10..11-11· [javascript, webassembly]
slides:none on file

Measures raw CPU-bound work by finding 25,000 primes, comparing a like-for-like C++ baseline to JavaScript on V8. Initial JS runs ~4× slower, but after fixing a bounds bug, preallocating arrays, stabilizing hidden classes and types, and using Ignition and Turbofan optimizations JS approaches native speed (within ~45%), while adding type hints yields ~10% gain and a better algorithm gives ~30× speedup. Uses V8 tracing/profiler and Chrome flags; use WebAssembly only when JS semantics limit performance.

AI-written summary · about

  1. 0:00Introduction and background
  2. 5:51How V8 optimizes JavaScript
  3. 16:50Hidden classes and type tracking
  4. 22:10TurboFan and optimizing compiler
  5. 27:52Avoiding optimization pitfalls
  6. 31:03Benchmarking and real-world fixes
  7. 34:20Performance comparison with C++
  8. 37:13Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.