Join Nostr
2026-06-08 22:07:38 UTC

David Smith on Nostr: Misc String speedups in the beta versions of Swift + Foundation (send me bugs if you ...

Misc String speedups in the beta versions of Swift + Foundation (send me bugs if you run into problems!):

* Most NSString methods that take encoding params are much faster on bridged Strings for UTF8
* -getBytes:… is faster, especially concurrently
* -stringByAppendingString: then bridging no longer produces weirdly slow Strings
* -length is faster, much faster on NSStrings created by String(decoding: as: UTF16.self)
* NSDictionary -> Dictionary<String, Any> is at least 25% faster

#wwdc