3 ms·
That's correct in the worst case, but in the best case, std::string does not allocate memory anymore (short string optimisation), e.g. libc++: http://stackoverf
by gurkendoktor 12y ago
That's correct in the worst case, but in the best case, std::string does not allocate memory anymore (short string optimisation), e.g. libc++: http://stackoverflow.com/a/21710033 http://stackoverflow.com/a/21710033
So it might be "malloc-free" for configuration files where the possible values are limited, etc. :)