For those asleep at 2am: I blogged about Swift in my normal bombastic style which isn’t getting old, nope. http://blog.wilshipley.com/2016/05/pimp-my-code-book-2-swift-and-dynamism.html …
@phink0 @mpweiher @wilshipley The Foundation -hasPrefix: does an exact compare; maybe Swift stdlib one does a fancy Unicode compare.
-
-
@mjtsai@phink0@mpweiher@wilshipley Yeah. Some Unicode operations are also implemented naively and make unnecessary extra copies. - View other replies
-
@mjtsai@phink0@mpweiher@wilshipley Would be interesting to compare with x.utf16.startsWith(y.utf16) to see if that's the case. -
@jckarter@phink0@mpweiher@wilshipley In XCTest, I found ($0 as NSString) only 5% faster and $0.utf16.startswith 34% faster. -
@mjtsai@phink0@mpweiher@wilshipley Does x.lazy.filter to avoid the intermediate array construction improve more? -
@jckarter@phink0@mpweiher@wilshipley About 10%.
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Wil Shipley
Marco Scheurer
Marcel Weiher
Michael Tsai
Joe Groff