0

I am looking for a way to increase the available CPU capacity for a objective C program that i have written. When simulating my program CPU usages jumps up quickly to 100% but I recon it is not fully using the CPU capacity of my Mac Pro. If I run my program simultanously twice, both instances use 100% CPU capacity.

I do find many links on reporting on CPU usage (basically objective C facilitates in this itself already when running my application) but I do not find links on how I can increase CPU availability.

Key issue here to solve is that I increas CPU usage, I expect the performance of my program to be increase (faster finalization of calculations to be done)

thanks for helping out / responding.

  • 1
    this could be due to your program not taking advantage of multithreading, and then running the program twice is just running the program on a different cpu cores – Fonix Jan 06 '15 at 08:10
  • but how can I assign more CPU cores to the same program? – Tesh1973 Jan 06 '15 at 08:59
  • the easiest way is to break up your calculations into parts that can be calculated at the same time (aka concurrently) the easiest way to get into this is to use [Grand Central Dispatch](https://developer.apple.com/library/mac/documentation/Performance/Reference/GCD_libdispatch_Ref/index.html) or "GCD". but ye in short you want to make your program multithreaded, which i cant explain in a couple of sentences. – Fonix Jan 06 '15 at 09:08
  • ok thanks! no worries I will do some investigations on how to get up to speed on that! – Tesh1973 Jan 06 '15 at 09:14
  • to point you in the right direction, [this tutorial](http://www.raywenderlich.com/60749/grand-central-dispatch-in-depth-part-1) will probably explain it quite well – Fonix Jan 06 '15 at 09:23

0 Answers0