Get Updates By E-mail 

Article Written By:
Johann Dowa

How To Easily And Accurately Time Objective-C Blocks To See Which Code Performs Better

  •  
  •  
  •  
  •  
  •  

Being able to accurately time code to see which performs faster is extremely useful.  That being said it can be extremely difficult to find a timing function that is accurate enough to time in small increments.

Tools such as the Profiler can show you lagging areas within your code, but aren’t really designed to track the performance of one piece of code vs. another.

Mark Dalrymple has put together a nice snippet of code along with an example on how to use showing you to how to easily and accurately compare the performance of one Objective-C block vs. another.

You can find the example on the Big Nerd Ranch website here.

Extremely useful for squeezing out that last bit of performance, no question as to whether or not one piece of code really runs faster than another – you can find out for certain.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments