This commit is contained in:
greg
2019-03-02 22:06:24 -05:00
parent 514e62181d
commit 8f9e71a4d1
6 changed files with 6 additions and 4 deletions
Vendored
+3 -1
View File
@@ -163,9 +163,11 @@ void _fill_random_inner_mt(int64_t cnt, HT &hash, RSU &rsu)
}
```
Using multiple threads, we are able to populate the parallel_flat_hash_map (inserting 100 million values) three times faster than the standard flat_hash_map (which we could not have populated from multiple threads without explicit locks, which would have prevented performance improvements).
Here is the graphical visualization of the results:
![mt_stl_flat_par comparison](https://github.com/greg7mdp/parallel-hashmap/blob/master/img/mt_stl_flat_par_both_run2.PNG?raw=true)
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

+3 -3
View File
@@ -39,9 +39,9 @@ for line in lines:
benches[benchtype] = 1
proper_names = {
'std::unordered_map': 'std::unordered_map',
'absl::flat_hash_map': 'absl::flat_hash_map',
'absl::parallel_flat_hash_map': 'absl::parallel_flat_hash_map'
'std::unordered_map': 'std::unordered_map (1 thread)',
'absl::flat_hash_map': 'absl::flat_hash_map (1 thread)',
'absl::parallel_flat_hash_map': 'absl::parallel_flat_hash_map (8 threads)'
}
proper_color = {