This change gives an extra character of SSO space.
The core of the change is to make the short-string indicator byte be used for remaining space instead of current size when in short string mode. When there is 0 remaining space, the indicator byte will be 0 which is also a null terminator. Notably this optimization was popularized by Andrei Alexandrescu in fbstring.
This change gives an extra character of SSO space.
The core of the change is to make the short-string indicator byte be used for remaining space instead of current size when in short string mode. When there is 0 remaining space, the indicator byte will be 0 which is also a null terminator. Notably this optimization was popularized by Andrei Alexandrescu in fbstring.