Reputation:
I was wondering what is the difference between using a for loop, and using the dispatch_apply
function of GCD and couldn't find an answer in the documentation nor in questions here.
Also, will using the GCD function in a runtime situation as a GLKit render/update method will produce better results?
Upvotes: 1
Views: 577
Reputation: 86651
Also, will using the GCD function in a runtime situation as a GLKit render/update method will produce better results?
The only way to answer that question is to try it and measure the performance.
Upvotes: 1
Reputation: 4057
The documentation states :
The dispatch_apply() function provides data-level concurrency through a "for (;;)" loop like primitive:
This means that the code block called by dispatch_apply will not be called sequentially like the for but can execute concurrently.
Upvotes: 1