• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mystery Threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mystery Threads


  • Subject: Re: Mystery Threads
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 29 Sep 2016 15:05:39 +0700

> On 29 Sep 2016, at 14:38, Quincey Morris <email@hidden> wrote:
>
> On Sep 29, 2016, at 00:15 , Gerriet M. Denkmann <email@hidden> 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?

Well, nothing. Just let’s call it nbrOfBlocksToBeUsedByDispatchApply, or whatever. But ultimately any of these things has to run on a CPU, of which there are no more than 8.

>
>> 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?

Might be. I already looked at Time Profiler, but failed to notice anything (maybe was looking at the wrong things) and System Trace, but did not understand what to observe or what the Instrument was telling me.
Maybe some other Instrument would help?
What should I look for?


Kind regards,

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Mystery Threads
      • From: Daniel Vollmer <email@hidden>
    • Re: Mystery Threads
      • From: Quincey Morris <email@hidden>
References: 
 >Mystery Threads (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Mystery Threads (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Mystery Threads
  • Next by Date: Re: Mystery Threads
  • Previous by thread: Re: Mystery Threads
  • Next by thread: Re: Mystery Threads
  • Index(es):
    • Date
    • Thread