.@mjtsai I think the problem you identified in your blog entry permeates Swift - trading predictable runtime perf for "the correct way".
@mjtsai if you send an NSMutableArray / NSArray as arg, copy only happens on explicit copy. In Swift, this depends on code & optimization.
-
-
@mjtsai since this is strongly dependent on optimization it ends up unpredictable. This is a very real issue with Swift right now. -
@nuoji Agreed. Do you think this is fixable? -
@mjtsai the most worrying part is that issues are patched as they are discovered. It looks like any addition to the lang would then - -
@mjtsai require additional patches for every special case. -
@mjtsai compare ObjC where there aren't all that many places where you can optimize. - View other replies
-
@mjtsai perf is slower than swift in the fastest case, but it is consistent, where Swift easily can differ several orders of magnitude. - View other replies
-
@nuoji Seems like you have to hope that the compiler never regresses and also that you can figure out what it's doing in pathological cases. -
@mjtsai "Seems like you have to hope that the compiler never regresses" exactly. You need to put your faith in the optimizer. That is scary. - Show more
-
-
@nuoji ObjC only copies when you say, and even then sometimes it's a no-op. Swift copies all the time, implicitly—and, again, often a no-op.
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.
Christoffer Lernö
Michael Tsai