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 …
@mpweiher @phink0 @wilshipley That’s very interesting. Have you tried profiling it? Bridging overhead?
-
-
@mjtsai@mpweiher@wilshipley Here's the profile (and for completeness the ObjC simple/naive/ugly filter category)pic.twitter.com/lbeIS8sEg8
- View other replies
-
@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
-
@jckarter@mjtsai@phink0@wilshipley Dunno, I see “CFStringFindWithOptionsAndLocale()” in the profile and also when I profile -hasPrefix: - View other replies
-
@mpweiher@jckarter@phink0@wilshipley If you look at the code, Swift is using kCFCompareNonliteral and NSString is not. -
@mjtsai@jckarter@phink0@wilshipley I no longer have access to Foundation source code… -
@mpweiher@jckarter@phink0@wilshipley You can see in Hopper that it’s only passing NSAnchoredSearch. -
@mjtsai@jckarter@phink0@wilshipley Just ran some tests and kCFCompareNonliteral does not make a difference with simple prefix comparison
-
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