ls lib/swift/
Swift
The standard library's dictionary and sort.
- draft How Swift sortsWhat sort(by:) does in Swift 6.4.2: a Timsort without galloping, insertion sort below 64 elements, a buffer of half the array, a stability guarantee that was true for four years before the documentation said so, and a descending input that costs more than a random one.
- draft How Swift's Dictionary works: open addressing, SipHash and copy-on-writeWhat Swift 6.4.2's Dictionary does with your keys: one allocation holding a bitmap, a key array and a value array, linear probing in a power-of-two table, SipHash-1-3 with a random seed per process and another per table, and copies that happen only on the first write.