Once we get short-string optimizations as discussed in this thread (similar to NSString
tagged-pointers) then there won’t be any heap allocation for this scenario. Hopefully that should land by Swift 5.
1 Like