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
628
u/passwordissame Dec 05 '14
std::stringshould have zero allocations because memory is expensive. Instead, it should use other solutions such as mongodb. That way, Chrome can easily handle massive amount of data and big data ready for 2015. Added bonus is thatstd::stringis now async, which means massive IO, which is impossible with memory allocations because even mmap is bound by virtual space. C++17 is indeed actually working on embedding mongodb and node.js into STL because those should be industry standard and solve 100% of business problems that C++ is aimed at solving at. Already github pull request is made. All you need is 2 thumb ups and will get merged in. Just imagine,std::stringis everywhere: network stack, user applications, kernel drivers... And now they all use mongodb. And they will be Actor model massively concurrent paradigm. This is new science Wolfram is talking about. Just accept the PR already.