Does phmap benefits from using a custom allocator like tcmalloc? #124
-
Is it any beneficial to use some sort of custom allocator like tcmalloc, mimalloc, jemalloc, nedmalloc etc..? Is there any benchmark comparing these? Thanks and keep the good work! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Probably not for flat_hash_map/set which don't do many allocations.
Hey, glad you appreciate, and thanks for the kind words! |
Beta Was this translation helpful? Give feedback.
-
Sounds good, thanks @ArthoPacini ! Let us know what you find out. |
Beta Was this translation helpful? Give feedback.
-
Wow, that's great! I am a bit surprised because the |
Beta Was this translation helpful? Give feedback.
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 theparallel_flat_hash_set
which allocates? Maybe there are some unnecessary copies causing memory allocations?