News for hackers. Stuff that matters.
Re:Apple’s Use of Swift in iOS 13 by bluk on Friday September 27, 2019 @09:26AM (#21091677)
Were your performance problems before or after Swift 5's switch to using UTF-8 as the preferred encoding? See https://swift.org/blog/utf8-string/ . It sounds like before, so you may want to check out the String performance again.

Swift 5.0 and 5.1 each supposedly made some 10-20% gain in ARC performance compared to the previous version (4.2 and 5.0), so that may also help. I think Swift's performance can be very hit or miss but they (Apple) are making some good strides.

Re:Apple’s Use of Swift in iOS 13 by prewett on Friday September 27, 2019 @12:05PM (#21093430)
It was Xcode 10.2, I think. (10.something), I think that’s Xcode 5.

hasSuffix() doesn’t need UTF-8 to be performant, though. As long as both strings are both the same encoding, just go back len(suffix) bytes from the end of the string and memcmp to see if they are equal.