Commonly used data structures for Swift
Swift Collections is an open-source package of data structure implementations for Swift, developed by Apple. It provides commonly used collection types organized into thematic modules, including double-ended queues (Deque), ordered sets and dictionaries that preserve insertion order, bit-efficient collections like BitSet and BitArray, heaps for priority queue use, persistent hashed collections using CHAMP trees, and ownership-aware variants of standard containers like UniqueArray and RigidArray. The package is built in Swift and includes extensive benchmarking infrastructure, comprehensive test support libraries with custom assertions and conformance checkers, and experimental features gated behind package traits for early adopters to validate emerging abstractions.