Double vs float on the iPhone

The iPhone can do both single and double precision arithmetic in hardware. On the 1176 (original iPhone and iPhone3G), they operate at approximately the same speed, though you can fit more single-precision data in the caches. On the Cortex-A8 (iPhone3GS, iPhone4 and iPad), single-precision arithmetic is done on the NEON unit instead of VFP, and is substantially faster.

Make sure to turn off thumb mode in your compile settings for armv6 if you are doing intensive floating-point computation.

Leave a Comment