Implement transient structures to make bulk updates efficient. Transient structures are mutable and perform updates in-place. They can be converted from/into immutable structures in constant time, and they get invalidated after the updates are applied:
vector = Immutable::Vector.new([1, 2, 3])
vector = vector.transient do |vec|
100.times { |i| vec = vec.push(i) }
end
Implement transient structures to make bulk updates efficient. Transient structures are mutable and perform updates in-place. They can be converted from/into immutable structures in constant time, and they get invalidated after the updates are applied:
Roadmap:
Vector::Transient
Map::Transient