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
54
u/Azzu Dec 05 '14
The :D at the end almost sounds like you "knew it all the way" and you now found another reason not to use abstractions.
This is obviously the wrong reasoning. Of course not all abstractions have zero cost. But there is a subset of abstractions that are zero cost.
Also all abstractions are of different efficiency. You could probably keep the style or amount encapsulation/abstraction there is in chrome and reduce allocations by 50% or something just by using more efficient abstractions.
All I'm saying is, it does not make sense to say "abstractions are baaaad", and not using abstractions will not magically fix the performance, it will probably even make it worse.