mikeash has a great post on Apple&#x27;s tagged pointer for NSString:<p><a href="https:&#x2F;&#x2F;www.mikeash.com&#x2F;pyblog&#x2F;friday-qa-2015-07-31-tagged-pointer-strings.html" rel="nofollow">https:&#x2F;&#x2F;www.mikeash.com&#x2F;pyblog&#x2F;friday-qa-2015-07-31-tagged-p...</a><p>In that environment, you only have 60 bits to play with, so it&#x27;s more aggressive about varying encodings to fit in more common strings.