3 ms·
Note that std::string data representation, and the associated set of small-string optimizations, are highly implementation-dependent; it even differs significan
by chrchang523 7y ago
Note that std::string data representation, and the associated set of small-string optimizations, are highly implementation-dependent; it even differs significantly between clang and gcc's standard libraries. For gcc, std::string size has been 32 bytes on 64-bit targets for the last several years.
- dekhn 7y agoYep. You can see some more context here: http://scottmeyers.blogspot.com/2012/04/stdstring-sso-and-move-semantics.html http://scottmeyers.blogspot.com/2012/04/stdstring-sso-and-mo... I don't know if there are any canonical writeups on the various string implementations and their performance implications wrt modern hardware.