32-Element Branching: How Scala Vectors Solve Immutable Memory Pressure
TL;DR: Traditional immutable arrays are slow because updating an element requires a full O(n) copy. Scala’s Vector solves this by using a 32-way branching trie. This enables structural sharing, allowi
doogal.dev5 min read