"Reading notes" ios-tagged pointer objects-Considerations

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.