mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Add partial range subscripts to _UnmanagedOpaqueString * Use SipHash13+_NormalizedCodeUnitIterator for String hashes on all platforms * Remove unecessary collation algorithm shims * Pass the buffer to the SipHasher for ASCII * Hash the ascii parts of UTF16 strings the same way we hash pure ascii strings * De-dupe some code that can be shared between _UnmanagedOpaqueString and _UnmanagedString<UInt16> * ASCII strings now hash consistently for in hashASCII() and hashUTF16() * Fix zalgo comparison regression * Use hasher * Fix crash when appending to an empty _FixedArray * Compact ASCII characters into a single UInt64 for hashing * String: Switch to _hash(into:)-based hashing This should speed up String hashing quite a bit, as doing it through hashValue involves two rounds of SipHash nested in each other. * Remove obsolete workaround for ARC traffic * Ditch _FixedArray<UInt8> in favor of _UIntBuffer<UInt64, UInt8> * Bad rebase remnants * Fix failing benchmarks * michael's feedback * clarify the comment about nul-terminated string hashes
18 KiB
18 KiB