On Sep 29, 2016, at 00:15 , Gerriet M. Denkmann <g...@mdenkmann.de> wrote:
> 
>       dispatch_apply( nbrOfThreads, queue, ^void(size_t idx)
> 
> As my computer has just 8 CPUs, I thought that using nbrOfThreads > 8 would 
> be silly: adding overhead without gaining anything.
> 
> Turns out this is quite wrong. One function (called threadHappyFunction) 
> works more than 10 times faster using nbrOfThreads = a few ten-thousand (as 
> compared to nbrOfThreads = 8).
> 
> This is nice, but I would like to know why can this happen.

What makes you think “nbrOfThreads” represents a number of threads?

> Why are the threads seemingly blocking each other?
> What is going on here?
> How can I investigate this?

Isn’t this what Instruments is for?

_______________________________________________

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

Reply via email to