Tuesday, December 30, 2014

What is iOS 64 bit architecture?


Starting with iOS 7 and the A7 processor, we can build the apps that take advantage of 64 bit processor. An app that supports 64bit processing almost always gains improved performance when compared with a 32 bit app running on the same device. 

The Apple A7 processor supports two distinctive instruction sets. The first is the 32 bit ARM instruction set supported by Apple’s previous processors. The second is the brand new 64 bit ARM architecture. The 64 bit architecture includes support for vastly larger address space, but that is not only the major improvement it provides. The 64 bit architecture provides new streamlined instruction set that supports twice as many as integer and floating point registers. Apple’s LLVM compiler has been optimised to take full advantage of this architecture. As a result, 64bit apps can work with more data at once for improved performance. Apps that extensively use 64 bit integer math or custom NEON operations see even larger performance gains. So, even though 32 bit apps run faster already on A7 processor, converting the apps to 64 bit almost always provides a better performance. 

When a 64 bit app is running in iOS, pointers are 64 bits, Some integer types, once 32 bit are also now 64 bits. Many data types in the system frameworks, especially UIKit and foundation have also changed. These changes mean that a 64 bit app uses more memory than a 32 bit app. If not managed carefully, the increased memory consumption can be detrimental to the app’s performance. 

When iOS is executing on a 64 bit device, it loads both 32 and 64 bit versions of the system frameworks. When all apps running on this device is converted to use the 64 bit architecture, iOS never loads the 32 bit version of the libraries. As a result system never uses the 32 bit version and apps loads faster.  


References:

No comments:

Post a Comment