views:

21

answers:

1

Hi all,

I would like to compare the real efficiency of different scripts. I currently use a timer :

 NSDate *start = [NSDate date];
    // Do something
 NSLog(@"Elapsed : %f",[start timeIntervalSinceNow]);

But it is not relevant since it might depend on the OS working in the background, etc... Does something that really measure the processor cycles needed to execute the script exist ? Or something equivalent ?

Thanks

A: 

Shark might help you. Guide for iPhone: http://rudifa.wordpress.com/2009/09/16/profiling-an-iphone-application-with-shark/

More info: http://stackoverflow.com/questions/1616564/why-is-run-run-with-performance-tool-shark-always-gray-in-xcode-how-to-cal

gustaf
A different way to do what I want, thanks !
Julien
Great Julien, please mark as correct answer if you're satisfied :)
gustaf