Reputation: 20485
benchmarks here:
On the use and abuse of alloca
I assume the same holds for other Unices, when google perftools exists, and it is 2x (a bit more) faster than a standard allocator, why then do distributions still ship with sub-optimal ones ? Bearing in mind that tcmalloc has been available for 5+ years.
Upvotes: 1
Views: 679
Reputation: 22591
It's rare that something is quite simply "2x faster" than something else. It might be 2x faster 90% of the time, and 10x slower 10% of the time. For a general system allocator, you want something that does fairly well all the time, rather than very-good-at-specific-cases. That's probably why the default allocator isn't tcmalloc - it needs to be at least OK-ish at everything, rather than super specialised.
Upvotes: 4