Ios-tagged pointer objects-Considerations

Source: Internet
Author: User

In September 2013, Apple introduced the iphone5s, while IPhone5S was equipped with the first A7 dual-core processor with 64-bit architecture, and Apple proposed the concept of tagged pointer in order to save memory and improve execution efficiency.

For 64-bit programs, when the tagged pointer is introduced, the associated logic can reduce the memory footprint by half, and 3 times times the access speed, and 100 times times the creation, the destruction speed increases.

Second, when 8 bytes can host the numeric value used for the representation, the system generates pointers in the form of tagged pointer, and if the 8 bytes are not able to be loaded, then the normal pointers are generated in the previous 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 directly access its ISA variable when we use it.

Reference: iOS Development advanced-Tang Qi

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

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.