Small String Optimization
IBM Small String Optimized (SSO) string class
Note:
- The new SSO string class has the same public interface (member functions) as std::string but the new string class called sso_string resides inside the ibm namespace (ibm::sso_string).
- There may be possible issues when converting between the two string types std::string and ibm::sso_string. A standard string object may not be passed to a function as a sso_string reference because the object that used to initialize a reference must be of the same type as the reference, or it must be of a type that is convertible to the reference type.
- When you port applications from std::string to ibm::sso_string, you need to rewrite fully qualified calls to std::string to directly use ibm::sso_string.
- The SSO buffer size is fixed at 32 elements. As a result, a string is considered small if it is less than 32 bytes.
- The small string optimized (SSO) string class is binary incompatible with the current std::string class implementation.
See also
- libc++
- GCC:Optimization