Files
Luke SandbergandGitHub aaf2fe3d58 [turbopack] Optimize the implementation of AutoMap/AutoSet
(#95694)

Optimize the implementation of AutoMap/AutoSet.

Previously the `List` variant was backed by a `SmallVec` in inline mode,
which needs at least 24 bytes of header (`len`, `cap`, `ptr` — all
`usize`) even though the list never holds more than 32 elements.

This replaces it with the `TinyVec` struct from turbo-tasks-backend
which is now enhanced with support for an `inline` array. The length is
a `NonZeroU8`, which reserves a niche the `AutoMap` enum folds its
discriminant into — dropping `AutoMap`'s minimum size to 16 bytes. This
in turn shrinks `TaskStorage` and the `LazyField` enum. Some inline
structs in TaskStorage are increased in size so we keep the 128 byte
footprint
2026-07-14 16:35:00 -07:00
..