- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to speed-up concurrent_hash_map by using multiple concurrent_hash_maps which are bucketed by a primary hash.
We have around two million objects to store and 32 threads are accessing them. We created 64 concurrent_hash_maps and based on the key, used one of the map to insert and lookup objects. We expected significant speed gain compared to using one map but the insert and lookup time remained pretty much the same.
ObjectMaps[key&63]->insert();
ObjectMaps[key&63]->find();
Any insight will be appreciated
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my opinion, external bucketing should not help significantly because tbb::concurrent_hash_map also uses the bucket-based approach internally. Therefore, tbb::concurrent_hash_map implements similar idea and external bucketing seems redundant. I am not sure that it is possible to speed it up easily without changing the algorithm.
Could you describe your algorithm that we can try to find another approach to optimize it? Have you tried Intel VTune Amplifier to find bottlenecks in your application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alex, at this moment it's just a test program to compare TBB with our in house solution which we plan to replace using TBB.
Can you comment on algorithm complexity of TBB and how does the performance of TBB changes as number of object grows. Maybe that could a reason that second level of bucketing had no significant impact on performance.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page