You Did What? Understanding Node.js Optimizations
summary
Shows concrete optimizations: hoisting callbacks cuts a prime-generator run from 19.5 seconds to 4.6 seconds, switching encodings and using externalized strings avoids huge UTF‑8 decode overhead and GC spikes, and moving bookkeeping out of V8 reduces process.nextTick crossings from ~100,000 to ~14,000 callbacks per second. Benchmarks run on master, C++ helpers and native modules are used, patches are committed and measured, and the hacks demonstrably improve throughput and latency.
AI-written summary · about
chapters (5)
- 0:00Start
- 3:15why is core code so confusing
- 13:33strange side effects Mutable Strings!!!
- 14:19best practice tip DON'T MUTATE YOUR STRINGS!!!
- 15:54write object properties in js








