-
Notifications
You must be signed in to change notification settings - Fork 121
Hash Map Benchmark
Felix Gündling edited this page Aug 21, 2019
·
2 revisions
Benchmark results from @martinus' benchmark suite comparing cista::raw::hash_map
with absl::flat_hash_map
, both with Abseil's hashing function.
Hardware: Late 2013 Mac Book Pro
Compiler: Clang 8.0.1 (Release build)
Test Case | Operation | Cista Timing | Cista Memory | Absl Timing | Absl Memory |
---|---|---|---|---|---|
CtorDtorEmptyMap | ctor & dtor empty map | 1.12e-07 | 0.0078125 | 0.234575 | 0.015625 |
CtorDtorSingleEntryMap | ctor & dtor map with 1 entry | 5.56329 | 0.0898438 | 11.0391 | 0.128906 |
InsertHugeInt | insert 100M int | 15.8582 | 1872.02 | 17.5138 | 1872.15 |
InsertHugeInt | clear 100M int | 0.0713953 | 1872.02 | 0.0686353 | 1872.15 |
InsertHugeInt | reinsert 100M int | 15.7225 | 1872.08 | 17.5115 | 1872.18 |
InsertHugeInt | remove 100M int | 17.1535 | 1872.08 | 19.2849 | 1872.18 |
InsertHugeInt | destructor empty map | 0.0728455 | 1872.08 | 0.0635276 | 1872.18 |
IterateIntegers | iterate while adding | 4.69787 | 2.14453 | 4.92399 | 2.21484 |
IterateIntegers | iterate while removing | 7.03086 | 2.14453 | 6.47078 | 2.21484 |
RandomDistinct2 | 5% distinct | 4.7003 | 72.0156 | 5.08918 | 72.1367 |
RandomDistinct2 | 25% distinct | 7.76231 | 288.07 | 8.70536 | 288.176 |
RandomDistinct2 | 50% distinct | 7.77399 | 576.07 | 9.11769 | 576.18 |
RandomDistinct2 | 100% distinct | 7.34941 | 1008.12 | 8.95751 | 1008.18 |
RandomFindString | 0% 100 byte | 4.34817 | 19.1953 | 4.48878 | 19.2305 |
RandomFindString | 25% 100 byte | 6.5731 | 19.2539 | 7.08621 | 19.3906 |
RandomFindString | 50% 100 byte | 8.11409 | 19.3906 | 8.72445 | 19.3984 |
RandomFindString | 75% 100 byte | 9.3175 | 19.3906 | 9.99143 | 19.457 |
RandomFindString | 100% 100 byte | 10.1794 | 19.3906 | 10.7499 | 19.457 |
RandomFindString_1000000 | 0% 13 byte | 7.07453 | 132.023 | 8.11859 | 132.105 |
RandomFindString_1000000 | 25% 13 byte | 11.8328 | 132.078 | 12.9541 | 132.109 |
RandomFindString_1000000 | 50% 13 byte | 15.4782 | 132.133 | 17.0503 | 132.152 |
RandomFindString_1000000 | 75% 13 byte | 19.2234 | 132.133 | 21.1135 | 132.207 |
RandomFindString_1000000 | 100% 13 byte | 22.6994 | 132.133 | 25.4145 | 132.207 |
RandomFind_200 | 0% success, 0x00000000ffffffff | 8.67311 | 0.0351562 | 6.58513 | 0.101562 |
RandomFind_200 | 0% success, 0xffffffff00000000 | 8.58912 | 0.0742188 | 6.52341 | 0.101562 |
RandomFind_200 | 25% success, 0x00000000ffffffff | 8.64899 | 0.0859375 | 6.89964 | 0.121094 |
RandomFind_200 | 25% success, 0xffffffff00000000 | 8.64513 | 0.0898438 | 6.8236 | 0.132812 |
RandomFind_200 | 50% success, 0x00000000ffffffff | 8.55242 | 0.09375 | 7.23126 | 0.136719 |
RandomFind_200 | 50% success, 0xffffffff00000000 | 8.54506 | 0.09375 | 7.22895 | 0.152344 |
RandomFind_200 | 75% success, 0x00000000ffffffff | 8.90019 | 0.09375 | 7.65427 | 0.15625 |
RandomFind_200 | 75% success, 0xffffffff00000000 | 8.74963 | 0.09375 | 7.66632 | 0.15625 |
RandomFind_200 | 100% success, 0x00000000ffffffff | 8.45687 | 0.101562 | 8.26679 | 0.15625 |
RandomFind_200 | 100% success, 0xffffffff00000000 | 8.62689 | 0.101562 | 8.47051 | 0.15625 |
RandomFind_2000 | 0% success, 0x00000000ffffffff | 9.76519 | 0.167969 | 7.10302 | 0.25 |
RandomFind_2000 | 0% success, 0xffffffff00000000 | 9.80477 | 0.234375 | 7.24574 | 0.265625 |
RandomFind_2000 | 25% success, 0x00000000ffffffff | 9.7026 | 0.253906 | 7.61493 | 0.265625 |
RandomFind_2000 | 25% success, 0xffffffff00000000 | 9.51166 | 0.28125 | 7.74619 | 0.289062 |
RandomFind_2000 | 50% success, 0x00000000ffffffff | 9.44472 | 0.285156 | 8.21549 | 0.296875 |
RandomFind_2000 | 50% success, 0xffffffff00000000 | 9.54861 | 0.285156 | 8.56908 | 0.308594 |
RandomFind_2000 | 75% success, 0x00000000ffffffff | 9.31456 | 0.285156 | 8.64818 | 0.335938 |
RandomFind_2000 | 75% success, 0xffffffff00000000 | 9.81131 | 0.285156 | 8.30809 | 0.335938 |
RandomFind_2000 | 100% success, 0x00000000ffffffff | 9.00024 | 0.285156 | 8.72585 | 0.355469 |
RandomFind_2000 | 100% success, 0xffffffff00000000 | 8.93084 | 0.304688 | 8.77032 | 0.355469 |
RandomFind_500000 | 0% success, 0x00000000ffffffff | 7.52929 | 34.0234 | 5.96099 | 34.1055 |
RandomFind_500000 | 0% success, 0xffffffff00000000 | 7.37669 | 34.0781 | 6.00151 | 34.1484 |
RandomFind_500000 | 25% success, 0x00000000ffffffff | 11.6983 | 34.1328 | 10.426 | 34.1914 |
RandomFind_500000 | 25% success, 0xffffffff00000000 | 11.4675 | 34.1328 | 9.34607 | 34.2109 |
RandomFind_500000 | 50% success, 0x00000000ffffffff | 12.985 | 34.1328 | 12.6532 | 34.2109 |
RandomFind_500000 | 50% success, 0xffffffff00000000 | 12.6394 | 34.1875 | 12.7567 | 34.2148 |
RandomFind_500000 | 75% success, 0x00000000ffffffff | 13.0588 | 34.1875 | 13.2993 | 34.2188 |
RandomFind_500000 | 75% success, 0xffffffff00000000 | 13.1818 | 34.1875 | 13.2336 | 34.2188 |
RandomFind_500000 | 100% success, 0x00000000ffffffff | 13.3784 | 34.1875 | 13.6424 | 34.2188 |
RandomFind_500000 | 100% success, 0xffffffff00000000 | 13.2573 | 34.1875 | 13.3657 | 34.2188 |
RandomInsertErase | 4 bits, 50M cycles | 1.40953 | 0.0078125 | 1.88005 | 0.101562 |
RandomInsertErase | 8 bits, 50M cycles | 1.67877 | 0.0546875 | 2.45452 | 0.128906 |
RandomInsertErase | 12 bits, 50M cycles | 1.51409 | 0.3125 | 2.25051 | 0.382812 |
RandomInsertErase | 16 bits, 50M cycles | 1.98252 | 4.29688 | 2.29844 | 4.36719 |
RandomInsertErase | 20 bits, 50M cycles | 4.64053 | 34.0469 | 5.10594 | 68.1172 |
RandomInsertErase | 24 bits, 50M cycles | 8.12249 | 544.047 | 9.25093 | 544.117 |
RandomInsertEraseStrings | 7 bytes | 4.57359 | 98.0195 | 5.49265 | 98.1133 |
RandomInsertEraseStrings | 8 bytes | 4.11311 | 98.0195 | 5.30464 | 98.1562 |
RandomInsertEraseStrings | 13 bytes | 4.61626 | 98.0898 | 5.77753 | 98.2148 |
RandomInsertEraseStrings | 100 bytes | 7.21546 | 138.051 | 7.25815 | 138.223 |
RandomInsertEraseStrings | 1000 bytes | 6.54804 | 183.109 | 6.59536 | 184.23 |