A Love Story Between JavaScript and C++
summary
Shows moving performance-critical functions from JavaScript/Node.js into C++ for procedural level generation, comparing two concrete approaches: using FFI to load native binaries into Node, and compiling C++ to WebAssembly with Emscripten to serve from Node.js+Express. Demonstrates calling a .wasm library from a server to animate a rectangle on a canvas, and reports speed benefits as well as practical downsides (extra complexity, native code maintenance, and WebAssembly’s experimental status in production).
AI-written summary · about
chapters (11)
- 0:00JavaScript and C++ love story
- 1:04JavaScript origin and evolution
- 3:12JavaScript performance problems
- 4:16FFIs with Node.js demo
- 8:34FFI disadvantages
- 9:57WebAssembly vs FFIs
- 12:06Emscripten setup
- 13:10Emscripten C++ demo
- 18:30JS and C++ with Emscripten
- 20:37Emscripten use cases
- 21:42Limitations and thoughts
related talks
34mBack to the FUTURE! From C++ to JS
35mBoost your JavaScript app
22mHarnessing the power of WebAssembly
39mBringing the power of C++ to the web
28mWebAssembly: Of Portability, and Performance
59mEmscripten and asm.js: C++'s role in the modern web
32mC++ Everywhere with WebAssembly
27mWebAssembly and Node.js
