5 ms·
I have a similar, but different story. When I worked at Google, one rule for C++ code was to always write a namespace prefix (so std::vector<T> instead of vecto
by msm_ 4y ago
I have a similar, but different story. When I worked at Google, one rule for C++ code was to always write a namespace prefix (so std::vector<T> instead of vector<T>, to avoid dark corners of the language). One exception was `string` - for some reason it was not `std::string` but just string.
I've read more about this inconsistency, and it turned out that at some point libc++ changed something in the string class and it caused a 1% performance regression in "an important google-wide benchmark". That 1% of performance was so important, that since that up to at least few years ago every C++ programmer had to put up with that. I guess it makes some sense - 1% of CPU cost across the whole Google fleet is a lot of saved CPU hours (and that equals money).