Iteration Efficiency: NSArray vs C Pointer Array?

I work at the sound buffer level, mixing audio signals created by a collection of objects. Since I iterate over these objects in 44.1khz, efficiency is crucial. Is there any difference in the efficiency of iterating over an NSArray against an array of C pointers? What about NSMutableArray?

+3
source share
2 answers

Is there any difference in the efficiency of iterating over NSArray against an array of C pointers?

Yes. Iterating directly over the C array will be faster.

. 44 100 , , , ( , , , , , , 44 100 ).

NSMutableArray?

Vs. NSArray? , .

+6

NSFastEnumeration -countByEnumeratingWithState: objects: count: C NSArrays, NSMutableArrays , , -AtIndex: . , , .

0

Source: https://habr.com/ru/post/1736835/


All Articles