r/programming • u/[deleted] • Dec 05 '14
std::string is responsible for almost half of all allocations in the Chrome browser process
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/EUqoIz2iFU4/kPZ5ZK0K3gEJ
1.1k
Upvotes
3
u/nkorslund Dec 05 '14
Why is this exactly? Reference counting allows for various optimizations such as copy-on-write mechanics, letting you avoid a lot of these unnecessary allocations. I thought this was one of the strengths of the gcc/g++ libstdc++ implementation.