Files
Tobias KoppersandGitHub 1bdb2e2005 Turbopack: shrink amortized (#88619)
### What?

Use amortized shrinking.

Capacity should always be a power of 2.
We shrink when len is capacity / 3.
Assuming the capacity was `2^x` we shrink to `2^(x-1)` which is
`capacity / 2`.
Therefore capacity is still larger than len, which avoids direct
reallocation when items are added again.
2026-01-21 10:36:24 +01:00
..
2026-01-21 10:36:24 +01:00