[Reading Notes] iOS-Tagged Pointer object-note, ios-taggedpointer

Source: Internet
Author: User

[Reading Notes] iOS-Tagged Pointer object-note, ios-taggedpointer

I. In September 2013, Apple launched the iPhone 5S. At the same time, the iPhone 5S was equipped with the first A7 dual-core processor with a 64-bit architecture. In order to save memory and improve execution efficiency, apple proposed the Tagged Pointer concept.

For 64-bit programs, the introduction of Tagged Pointer can reduce the memory usage by half, increase the access speed by three times, and increase the creation speed by 100 times.

 

2. When 8 bytes can carry the value used for representation, the system will generate a Pointer in Tagged Pointer mode. If the 8 bytes cannot carry the Pointer, then, we use the previous method to generate common pointers.

 

3. Tagged Pointer stores data directly in the Pointer by setting a special mark in its last bit. Because Tagged Pointer is not a real object, we need to be careful not to directly access its isa variable during use.

 

References: iOS development advanced-Tang Qiao

Related Article

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.