diff --git a/README.md b/README.md index e942fb6..177c319 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/img/mt_stl_flat_par_both_run2.PNG b/img/mt_stl_flat_par_both_run2.PNG new file mode 100644 index 0000000..65473e2 Binary files /dev/null and b/img/mt_stl_flat_par_both_run2.PNG differ diff --git a/img/mt_stl_flat_par_mem_run2.PNG b/img/mt_stl_flat_par_mem_run2.PNG new file mode 100644 index 0000000..27281e7 Binary files /dev/null and b/img/mt_stl_flat_par_mem_run2.PNG differ diff --git a/img/mt_stl_flat_par_mem_run2_zoomed.PNG b/img/mt_stl_flat_par_mem_run2_zoomed.PNG new file mode 100644 index 0000000..bd56cbe Binary files /dev/null and b/img/mt_stl_flat_par_mem_run2_zoomed.PNG differ diff --git a/img/mt_stl_flat_par_speed_run2.PNG b/img/mt_stl_flat_par_speed_run2.PNG new file mode 100644 index 0000000..38d9882 Binary files /dev/null and b/img/mt_stl_flat_par_speed_run2.PNG differ diff --git a/make_chart_data.py b/make_chart_data.py index 973d369..810aa2f 100644 --- a/make_chart_data.py +++ b/make_chart_data.py @@ -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 = {