Is there any optimization like NSFastEnumeration (batch fetching, detecting mutations) in Swift? SequenceType doesn’t seem to do that.
-
-
@mjtsai I think you can consider a Generator to be the equivalent of NSFastEnumerationState.0 replies 0 retweets 0 likes -
-
@mjtsai The generator can batch & detect mutations. Often it’ll live on the stack, so .next() is not much worse than incrementing the ptr.0 replies 0 retweets 0 likes -
@rob_rix that slow or that the batching isn’t that worth it.0 replies 0 retweets 0 likes -
@mjtsai As I understand it, it doesn’t necessarily have to send a message. It may not even need indirection through a vtable.0 replies 0 retweets 0 likes
@rob_rix Right, I meant how NSFastEnumeration was designed to avoid message sends.
10:14 AM - 19 Aug 2015
0 replies
0 retweets
0 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.
Michael Tsai
Rob Rix