Mike Ash’s Friday Q&A this week talks about Tagged Pointers and NSString.
If we’re optimizing for ASCII, we might as well drop full Unicode support altogether. Strings containing non-ASCII characters can use real objects, after all. ASCII is a seven-bit encoding, so what if we allot only
7bits per character? That lets us store up to eight ASCII characters in the
60bits available, plus
4bits left over for the length. This is starting to sound useful. There are probably a lot of strings in an app which are pure ASCII and contain eight characters or fewer.