Introduce new internal string type
CMake makes many copies of std::string
instances internally. At one time C++ standard libraries could use copy-on-write implementations for C++98 std::string
, but now with C++11 our memory usage has gone up.
Furthermore, many internal APIs that once took const char*
have been converted to std::string const&
to avoid extra strlen
calls and such. These now require an allocation or special extra overloads to handle passing string "literal" values to them.
I've been designing a new cm::String
type that can be used to solve these problems. I plan to open MRs sometime during post-3.13 development. This issue can serve to track the work.