Benchmark - unordered set

48 views
Skip to first unread message

pawan

unread,
Feb 7, 2022, 6:45:06 PM2/7/22
to Abseil.io
Hi guys,

I have an implementation of unordered_set which I would like to benchmark against the flash_hash_set. I have done some of my own comparison with 3 million randomly generated int64s, but don't have very reliable hardware and want to see if anyone is interested in doing a comparison for insert, search, delete.

I am happy to provide the interface and object file if anyone is interested, please let me know the compile flags I can use with GCC.

.. pawan

Matthew Fowles Kulukundis

unread,
Feb 7, 2022, 7:07:52 PM2/7/22
to pawan, Abseil.io
Pawan~

I do not think running binaries provided by others is a good idea.  If you would like to submit a PR to https://github.com/google/hashtable-benchmarks you can try and get a comparison that way.

Matt

--
You received this message because you are subscribed to the Google Groups "Abseil.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to abseil-io+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abseil-io/1f35f1d3-9a48-4db6-8b0a-60df74ce7da8n%40googlegroups.com.

pawan singh

unread,
Feb 7, 2022, 9:49:10 PM2/7/22
to Matthew Fowles Kulukundis, Abseil.io
Thanks for the link Matt.
..Pawan

Saroj Mahapatra

unread,
Feb 16, 2022, 6:53:19 PM2/16/22
to Abseil.io
Hi,

Instead of starting a new thread, I posted in this because it is related. I was surprised to see performance difference between unordered map and abseil flat hash map for lookups. This is the benchmark on my M1 MacBookPro:

Run on (8 X 24.121 MHz CPU s)
CPU Caches:
  L1 Data 64 KiB (x8)
  L1 Instruction 128 KiB (x8)
  L2 Unified 4096 KiB (x2)
Load Average: 3.50, 2.04, 2.01
-----------------------------------------------------------------------------
Benchmark                                   Time             CPU   Iterations
-----------------------------------------------------------------------------
BM_AbslHashMapLookUp/10000/1            24091 ns        24091 ns        28194
BM_AbslHashMapLookUp/10000/10           24085 ns        24085 ns        29031
BM_AbslHashMapLookUp/10000/100          24111 ns        24111 ns        29060
BM_AbslHashMapLookUp/10000/1000         24247 ns        24248 ns        28869
BM_AbslHashMapLookUp/10000/10000        25855 ns        25855 ns        27064
BM_AbslHashMapLookUp/10000/100000       28388 ns        28388 ns        24654
BM_UnorderedMapLookUp/10000/1           15647 ns        15647 ns        44629
BM_UnorderedMapLookUp/10000/10          15667 ns        15663 ns        44646
BM_UnorderedMapLookUp/10000/100         15649 ns        15649 ns        44676
BM_UnorderedMapLookUp/10000/1000        15647 ns        15647 ns        44658
BM_UnorderedMapLookUp/10000/10000       15797 ns        15797 ns        44328
BM_UnorderedMapLookUp/10000/100000      16062 ns        16062 ns        43128
BM_AbslVectorIndexing/10000/1            6342 ns         6342 ns       109623
BM_AbslVectorIndexing/10000/10           6346 ns         6346 ns       110130
BM_AbslVectorIndexing/10000/100          6345 ns         6345 ns       110132
BM_AbslVectorIndexing/10000/1000         6346 ns         6346 ns       110018
BM_AbslVectorIndexing/10000/10000        6346 ns         6346 ns       109751

Matthew Fowles Kulukundis

unread,
Feb 17, 2022, 1:44:31 PM2/17/22
to Saroj Mahapatra, Abseil.io
Saroj~

Benchmarking hashtables is heavily multi-dimensional.  I suggest you use the benchmarks in https://github.com/google/hashtable-benchmarks and the provided colab for understanding and plotting the results.

Matt

Reply all
Reply to author
Forward
0 new messages