next.js
6b89fe95 - Turbopack: use prototype for turbopack context for better runtime performance (#81547)

Commit
158 days ago
Turbopack: use prototype for turbopack context for better runtime performance (#81547) ### What? * use prototype for turbopack context for better runtime performance * remove destructuring when unneeded * ensure all calls use the correct context * create static module object at one location ### Why? Improve performance by reducing allocations in the hot path of module evaluation: Based on our module-cost benchmark this is about a 15% runtime improvement * CommonJS Execution Duration: 25.60ms → 21.85ms (14.6% improvement) * ESM Execution Duration: 53.34ms → 44.82ms (16.0% improvement) Which addressed most of the known gap with webpack. Part of PACK-5057
Author
Parents
Loading