invokedynamic.js
summary
Builds a proof of concept that maps JVM-style call site relinking into JavaScript and implements invokedynamic in a JS VM by generating per-site bootstrap handlers, compiling specialized handlers and patching globals. Uses V8 internals and even edits C++ heuristics to force inlining. Naive message send is 5,000 times slower, handler linking cuts that to about 3× slower, type-specialized arithmetic gets to 25% slower, semantics for Smalltalk-like sends works and most of the remaining gap comes from VM compilation pipeline limits.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:40Semantic compilers
- 6:48invokedynamicjs
- 9:06numerics
- 14:30inline handlers
- 16:02constants
- 19:02conclusion
related talks
28mdyn.js - 100% invokedynamic JavaScript implementation
36mFast and Dynamic
26mJavaScript JITs
31mJavaScript Compilation Techniques or "Wasn't JavaScript supposed to be slow?"
25mJavaScript engines how do they even?
24mmö.js - explaining js vm in js
57mNashorn War Stories: Dynamic Language Performance on the JVM
27mJavaScript as a compilation target - Making it fast
