0

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

Vladimir
  • 170,431
  • 36
  • 387
  • 313
Julien
  • 9,312
  • 10
  • 63
  • 86

1 Answers1

0

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

More info: Why is "Run > Run with Performance Tool > Shark" always gray in Xcode? How to call that?

Community
  • 1
  • 1
gustaf
  • 776
  • 1
  • 6
  • 6