mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
The defaultInternalCapacity and defaultLeafCapacity computations used Swift.min(16, capacityInBytes / MemoryLayout<Key>.stride), which capped the node capacity at 16 regardless of element size. This defeated the byte-budget intent: small elements should yield larger nodes, not be clamped to 16. Use Swift.max instead so 16 acts as a floor and the byte budget governs the upper bound, as confirmed by the maintainer in issue #257. Fixes #257