@inthehands found the code I was thinking of that handles NSString * being half the size of String in collections while still avoiding a temporary buffer: https://github.com/swiftlang/swift-corelibs-foundation/blob/1b514e4242526690c19fad9f53644065dd50b69d/Darwin/Foundation-swiftoverlay/NSDictionary.swift#L102