How to determine iPhone processor speed?

I have a reflective aesthetic interface element that works well on iPhone 3Gs and iPod Touch, but is too slow on 3G and earlier. What is the best way to determine processor speed so that I can disable this feature?

+4
source share
4 answers

What I ended up was the time of one iteration of my "slow" procedure. If it takes more than 0.5 seconds, I decide that the processor is too slow and I will turn it off.

So that the user interface is not confusing, I add the preference for switching this subroutine, and if I turn it off and the user selects, I will show a message that the โ€œfunctionโ€ has processor intensity and may have some aspects of the application seem to be sluggish, and they may will want to leave it. If they turn it on anyway, it's their choice. I will run this with my beta testers to see if I am confusing this too confusing.

The next step is optimization, but so far I have not been able to do it much faster.

0
source

Instead of trying to determine the speed, you can find out which model of iPhone or iPod Touch works on your application, and then disable the function if it is not an acceptable type of iPhone / iPod.

To do this, you can add the following to the application:

#import <sys/utsname.h> - (NSString *) machineModel { struct utsname systemInfo; uname (&systemInfo); return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; } 

Calling NSLog(@"Type: %@", [self machineModel]) will give you a hardware model .

+8
source

See this post: http://www.iphonedevsdk.com/forum/iphone-sdk-development/4960-how-identify-device-user.html#post111621

I think this will give you exactly what you are looking for.

+4
source

Personally, if the problem at hand is a reflection that slows down on the seeder devices, I would spend time optimizing the reflection, not finding the device. Simple reflection does not have to be CPU intensive, if properly designed, most of the work must be done on the GPU.

+1
source

All Articles