Skip to content

Does phmap benefits from using a custom allocator like tcmalloc? #124

Answered by greg7mdp
ArthoPacini asked this question in Q&A
Discussion options

You must be logged in to vote

using mimalloc with parallel_flat_hash_set leads to a 43% speedup and 30% reduction in memory usage over the default MSVC STL allocator

Wow, that's great! I am a bit surprised because the parallel_flat_hash_set itself should not allocate very much, unless you create a large number of them, or use a high number of submaps. Maybe it is the type you insert in the parallel_flat_hash_set which allocates? Maybe there are some unnecessary copies causing memory allocations?

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@ArthoPacini
Comment options

@chausner
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@chausner
Comment options

Answer selected by greg7mdp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants