This is a bit of a generic question.
I am working on an iOS cocoa-2d game which involves complex path finding algorithms. The game is turn based. So before each user’s turn I would like to calculate all possible paths. This involves running a lot of data manipulation commands and allocate and releasing simple data objects (no I/O) I am guessing about a million instructions are required to calculate all the paths each turn. Could the iPhone 3GS, 4 and 4G perform this at a fraction of a second, assuming the game is using a single thread.
In general how many instructions per second can be achieved within the game. I am looking for a guesstimate very high level figure.
This greatly depends on the type of “instructions” used in your algorithm or calculation, how they are scheduled by your compiler, and how you count them.
In extremely rough and coarse terms, the ARM CPUs currently used by Apple can issue on the order of 1 integer instruction per clock cycle, and the ARM processor cores used in iOS devices reportedly range in clock speed from 400 MHz to 1 GHz. A high ratio of floating point, multiply or divide instructions or cache misses may significantly change the actual instruction issue and retirement rate.
But the best way to get an accurate estimate would be to compile and benchmark your actual code on your target iOS device.