next.js
baad064f - Turboopack: put import attributes behind a pointer, 23% faster analyze (#91347)

Commit
61 days ago
Turboopack: put import attributes behind a pointer, 23% faster analyze (#91347) The JS analyze microbenchmark got 23% faster: Only a tiny fraction of imports have annotations, be it `import ... with {...}` or `require(/*webpackIgnore: true*/...)`, so a `Option<Pointer<Struct>>` mkes sense here. ``` canary: references/jsonwebtoken.js/full time: [63.250 ms 63.918 ms 64.752 ms] change: [-5.2380% -3.0074% -0.8753%] (p = 0.01 < 0.05) Change within noise threshold. Found 12 outliers among 100 measurements (12.00%) 5 (5.00%) high mild 7 (7.00%) high severe now: references/jsonwebtoken.js/full time: [49.070 ms 49.166 ms 49.273 ms] change: [-24.097% -23.079% -22.237%] (p = 0.00 < 0.05) Performance has improved. Found 6 outliers among 100 measurements (6.00%) 3 (3.00%) high mild 3 (3.00%) high severe ```` This came up in https://github.com/vercel/next.js/pull/91278#issuecomment-4058275943, which added another (tiny) field to ImportAttributes. But it caused a 6% regression in the microbenchmark anyway.
Author
Parents
Loading