@phink0 @wilshipley That looks about smack in the middle of the relative slowdowns I have been seeing.
-
-
@mpweiher@phink0@wilshipley That’s very interesting. Have you tried profiling it? Bridging overhead?0 replies 0 retweets 0 likes -
@mjtsai@mpweiher@wilshipley Here's the profile (and for completeness the ObjC simple/naive/ugly filter category)pic.twitter.com/lbeIS8sEg8
0 replies 0 retweets 1 like -
@phink0@mpweiher@wilshipley The Foundation -hasPrefix: does an exact compare; maybe Swift stdlib one does a fancy Unicode compare.0 replies 0 retweets 0 likes -
@mjtsai@phink0@mpweiher@wilshipley Yeah. Some Unicode operations are also implemented naively and make unnecessary extra copies.0 replies 0 retweets 2 likes -
@jckarter@mjtsai@phink0@wilshipley Dunno, I see “CFStringFindWithOptionsAndLocale()” in the profile and also when I profile -hasPrefix:0 replies 0 retweets 0 likes -
@mpweiher@mjtsai@phink0@wilshipley By "naive" I mean "copy into a CF string and hand off to a CF fn". Super naive0 replies 0 retweets 0 likes -
@jckarter@mjtsai@phink0@wilshipley I was replying more to the “fancy unicode vs. exact”, AFAICT they do the same.0 replies 0 retweets 0 likes -
@mpweiher@mjtsai@phink0@wilshipley The same CF takes a bunch of flags to enable different behaviors.0 replies 0 retweets 1 like -
@mpweiher@phink0@wilshipley Regardless, even with naive comparison it looks like@mjtsai still sees a >3x diff.0 replies 0 retweets 1 like
@jckarter @mpweiher @phink0 @wilshipley I’ve only been timing different Swift versions vs. Marco’s original. Didn’t test Obj-C.
-
@mjtsai@jckarter@mpweiher@wilshipley Should have done this before: XCode project at http://www.sente.ch/pub/PerfTest.zip …0 replies 0 retweets 4 likes
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.
Marcel Weiher
Michael Tsai
Marco Scheurer
Joe Groff