That removes the allocation but keeps the overhead of a pointer, a capacity and a fixed buffer.
And these strings in Goose are 6 bytes, while the ones in C++ are apparently 16 to 24 bytes each.
And these strings in Goose are 6 bytes, while the ones in C++ are apparently 16 to 24 bytes each.
Rust has had more interesting SSO types than C++ perhaps explicitly because it doesn't come with SSO out of the box although maybe also because C++ still isn't sure whether text is UTF-8 encoded even though it is 2026 now.