[PATCH] D132455: [ADT] add ConcurrentHashtable class.

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 12:12:47 PST 2023


steven_wu added a comment.

In D132455#4026480 <https://reviews.llvm.org/D132455#4026480>, @avl wrote:

>> I am super interested in how you do the comparison. Can you post a patch for the code you have for that? The HashMappedTrie hasn't been really tuned for performance/memory usage, it would be interesting to use your tool to do some investigation (for example, the NumRootBits and NumSubtrieBits can be tuned for memory/performance).
>
> @steven_wu I`ve updated D132548 <https://reviews.llvm.org/D132548> to have a possibility to measure HashMappedTrie. It depends on D125979 <https://reviews.llvm.org/D125979>, D132455 <https://reviews.llvm.org/D132455>, D133715 <https://reviews.llvm.org/D133715>. 
> In its current state patch does not set NumRootBits, NumSubtrieBits, though such options might be added. 
> If intel threading building block hashmap is not neccessary - the USE_ITBB should be unset.
> if lib cuckoo hashmap is not neccessary - the USE_LIBCUCKOO should be unset.
> Command line to run the tool:
>
> /usr/bin/time -f " %E %M " ./check-hashtable --data-set random --num-threads 1 --table-kind hash-mapped-trie --aggregate-data
>
> Any changes/suggestions are welcomed :-)

Thanks! It works great. The only downside is that different memory allocator is used in different implementation so the number is not directly comparable but could reflect the performance for simple use cases.

It is already good to look at the scaling factor for implementations (size and threads). For example, I see the default configuration for HashMappedTrie scales to about 4 threads, then it just goes really bad (because the root bits is only 6 so high contention is expected in the beginning).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132455/new/

https://reviews.llvm.org/D132455



More information about the llvm-commits mailing list