2 ms·
For many people SSO would be a waste of time except you need to store the empty string. There are people who make a lot of very short strings and need them to
by tialaramex 3y ago
For many people SSO would be a waste of time except you need to store the empty string.
There are people who make a lot of very short strings and need them to go fast, but not so many to justify making that a core language feature, if not for the fact that C++ empty string needs a zero byte for C compatibility.
That's why Rust got away without it, their empty string has length zero.