ObjFW  View Ticket

Ticket UUID: 31d1e19cd93a9f6044a1125fb1e1f080db5bf21b
Title: Support for tagged pointer strings
Status: Open Type: Feature_Request
Severity: Important Priority: Medium
Subsystem: Resolution:
Last Modified: 2020-09-29 22:04:46
Version Found In: Milestone: none
User Comments:
js added on 2020-09-29 22:04:46:

While support for tagged pointers was merged in [b4039f9a85], they are only being used by OFNumber and OFDate right now. It would be nice to also use them for short OFStrings. This requires a new OFString subclass.

Since most short strings will be ASCII, tagged pointer strings can be limited to ASCII strings, requiring only 7 bit per character. This would allow storing up to 8 characters in a tagged pointer on 64 bit systems (even when increasing the tag size to a full 8 bits) and up to 4 characters on 32 bit systems (but the tag size needs to stay at the current 4 bits).