> On Aug 23, 2014, at 12:46 AM, Gerriet M. Denkmann <gerr...@mdenkmann.de> > wrote:
> Works fine and is twice as fast. That approach is a bit naive, as it's going to spawn a huge number of dispatch queues (something like O(n) of them, I think.) Also, once the array sizes start getting smaller than a cache line the CPU cores are going to be fighting over access to memory. That's probably why you got only a 2x speedup instead of 4x or 8x (depending on your CPU). > But how to do this in Swift? The same way as in Objective-C. > Just doing the same as in Obj-C does not work (nor is it expected, as there > is no documented thread-safeness of Swift arrays). Well, Swift arrays are passed by value, not by reference. What does your Swift implementation look like? —Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com