Hi V8 team, I recently proposed a hybrid Arena + GC memory model for JavaScript runtimes, initially posted under the Node.js discussions since that was my entry point. However, after reflection, this idea is fundamentally a V8-level concern — the SPI, the dual-heap architecture, and the write barrier extension all live inside the engine, not the runtime above it.
The Node.js discussion is here for reference: https://github.com/orgs/nodejs/discussions/5143 The core idea in one sentence: Let GC learn business context via SPI. Rather than letting the GC guess which objects are short-lived, expose a minimal SPI that allows the hosting runtime (Node, Deno, or any embedder) to communicate request-scoped lifetime boundaries to the engine — enabling Arena allocation for the common case, with automatic promotion to GC for objects that genuinely escape. This is relevant beyond Node. Chrome's Service Workers and Web Workers share the same short-lived context semantics and could benefit from the same mechanism. Full proposal: https://github.com/babyfish-ct/node-arena-gc-hybrid I recognize this proposal asks for a non-trivial change to V8. I deliberated for a while before sending this — but the potential upside felt too significant to stay silent. If GC can learn business patterns from the hosting runtime via SPI, developers no longer have to choose between the expressive safety of GC languages and the performance of non-GC languages. That trade-off has been accepted as inevitable for decades. This proposal suggests it doesn't have to be. I'd genuinely love to hear your thoughts, even if the answer is "interesting, but not feasible." -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/CABOnjhjm470ZvwiP5Zt4omca1QgtiovFgYd5mwji%3DGrESEw1ag%40mail.gmail.com.
