In Depth iOS & Cocos2D Performance Analysis with Test Project

On November 17, 2011, in idevblogaday, by Steffen Itterheim

I took Mike Ash’s performance measuring code from 2008 with the improvements made by Stuart Carnie in early 2010 and turned that into a performance measuring project for 2012.

I know it’s still 2011, consider this a forward-looking statement. In any case, the test project is available for download, ready to run, includes Cocos2D v1.0.1 and is relatively easy to modify for your own needs. This project is also available on my github repository where I host all of the iDevBlogADay source code.

Since numbers are so dry and hard to assess, you’ll find the rest of this post garnered with charts and conclusions based on the results obtained from iPhone 3G, iPod 4 and iPad.

Continue reading »

I have no doubt that automatic reference counting (ARC) is the next big leap forward for Objective-C since the introduction of Objective-C 2.0. ARC allows you to put the burden of memory management on the (Apple LLVM 3.0) compiler, and never think about retain, release and autorelease ever again.

Since many user’s first experiences with ARC will be trying to convert an existing app, they will learn the hard way that converting existing code to ARC is not a fire & forget operation. And since this is the Internet, there’s also a lot of assumptions, false statements and other myths revolving around ARC going around.

So here’s just about everything you need to know about ARC, and some ARC-mythbusting too.

Continue reading »

This one is for the “techies” among you who would like to know about low-level performance specs of the iOS devices. Maybe you’ve heard of Mike Ash before? He’s a Mac programmer who writes about his profession on a weekly basis and Mike’s development blog is well worth browsing for highly interesting material. Back in March 2008 he published one of the first iPhone performance comparison for common operations.

Stuart Carnie then took this performance comparison and updated it with results for iPhone 4 and iPad, and published them in his Micro-Benchmarking blog post along with the source code. If you’re interested to learn how long it takes to perform a floating point division or a 1 MB memcopy across several iOS devices, these are the tests you were looking for.