One, in September 2013, Apple launched the IPhone5S, and at the same time, IPhone5S was equipped with the first A7 dual-core processor with a 64-bit architecture. In order to save memory and improve operation efficiency, Apple put forward the concept of tagged pointer.
For 64-bit programs. After introducing tagged pointer. The logic can reduce the memory footprint by half, with 3 times times faster access and 100 times times the creation. Destruction speed increased.
Two, when 8 bytes are able to host the numeric value used for the representation. The system generates pointers in the form of tagged pointer. Assuming that 8 bytes are not available, the normal pointer is generated in the same way.
Thirdly, Tagged pointer is used to store data directly in the pointer itself by setting a special tag at its last bit bit.
Because tagged pointer is not a real object. We need to be careful not to access its ISA variables directly.
References: iOS development advanced-Tang Qi
"Reading notes" ios-tagged pointer objects-Considerations