iPhone Game Optimizations. Ultimate Guide

I made a ppt presentation, where i described a lot of optimization best practices. Almost everything i know.
You can find it here.
Feel free to post your proposals, bug reports and feedback
P.S. English isn't my native language, so i will be thankful any comments about my writing style

Very nice set of slides. Some stuff in there I had never heard before.

Although I'd like to add about the GLKit math stuff that the issue isn't that it passes matrices and such by value, but the way it does them. Passing things by value to inline functions is normally fine and usually better than passing by reference as the compiler usually optimizes away the storage for the arguments. They either end up exclusively existing in registers when the function is inlined or having folding and constant propagation applied to them (even better). I've gotten a little "lazy" because of this, and the assembly output shows that the compiler generally knows what to do without me needing to hand simplify matrix multiplications for it.

The issue with the GLKMath stuff is that the *first* thing any of those functions do is to take the address of the arguments so it can cast them from it's own type to the NEON types. (/me facepalm) Thereby ensuring that the code has to keep pushing the values in the registers onto stack and read them back again constantly. You can see it in the assembly.

inline newer guaranties you, that this function will be inlined, it's only a hint for the compiler. So i doubt, that big functions, like Matrix4ByMatrix4 will be inlined. And this is very common operation. You can force compiler to inline function, using __attribute__((always_inline)).

Anyway. Thanks for your feedback! I have some more ideas to add to this material. Will see, when i'll have a time.

I did a talk for one local company, that do develop a software for iPhone. There are no video, however, the talk was not in English
You are not a first person, that asks me to write an article on all this stuff. I think, i'll be writing an article (every weekend), that will cover one (or two) slides with demo code.

P.S. If you'll help to spread the world, and more people will ask to write an article, that covers some particular slides, the more motivation i'll have to do this -> it takes much of the time and i do really have no time + i'm not good at writing stuff.

You may have a tough time finding "enough" people interested before you actually write it, but if you write it and we post it here, there will definitely be many people that find, read, and appreciate it.

What you write doesn't need to be a masterpiece from the start. That's where copy editors (AKA us) come in to correct typos, make the necessary changes to make the text clearer, find inaccuracies etc.

Dimka, it would be really great to see an article from this! Start simple, and there are people here at iDevGames that will help you clean it up and make a great article. I know I'm definitely interested in learning about these optimizations, and many people in my local iOS developer group would be, too.

iPhone game optimization is very good for iPhone app developer who want to optimize their iPhone game through some good tips. You have shared nice slides for iPhone game optimization, but as per the best suggestion concern you need to follow some SEO activities.