mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
Merging is best done in-place, as merging a non-empty dictionary will always mutate the dictionary, so we don’t have to tiptoe around uniqueness issues. (The union operation on PersistentSet is vaguely similar, but not quite — unlike with merge, union is able directly link shared subtrees into the result. However, a similar optimization may be worthwhile for symmetricDifference.)