You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current state of this proposal would have .snapshot() of a mutable collection make an immutable copy. Without special implementation tricks(*), this would be expensive.
By contrast, https://github.com/tc39/proposal-immutable-arraybuffer has a zero-copy .toImmutable(), that "detaches" the data from the original collection, so the creation of the derived immutable collection is zero-copy without special implementation tricks.
(*) such as copy-on-write. At least for ArrayBuffers (including proposed Immutable ArrayBuffers) some implementations have expressed strong reluctance to implement such tricks. However, we don't yet know whether this reluctance would apply to other collections.
The text was updated successfully, but these errors were encountered:
The current state of this proposal would have
.snapshot()
of a mutable collection make an immutable copy. Without special implementation tricks(*), this would be expensive.By contrast, https://github.com/tc39/proposal-immutable-arraybuffer has a zero-copy
.toImmutable()
, that "detaches" the data from the original collection, so the creation of the derived immutable collection is zero-copy without special implementation tricks.(*) such as copy-on-write. At least for ArrayBuffers (including proposed Immutable ArrayBuffers) some implementations have expressed strong reluctance to implement such tricks. However, we don't yet know whether this reluctance would apply to other collections.
The text was updated successfully, but these errors were encountered: