Enhance implementation of ShardedMap class#59
Conversation
|
sharded_map.h line 9 — TBB header portability
|
|
|
|
|
|
|
|
|
|
CMakeLists.txt lines 11–12 — CI failure / unconditional TBB
|
…mplementations of sharded map.
…count in member field for required references.
I opted to make this case unrecoverable by returning false instead. I think the user should be fully aware what value is being used. |
A summary of the code changes in this PR is provided below.
ShardedMapthat uses concurrent hash maps from oneTBB.With these modifications, the shim layer now has the option of using an optimized thread safe map data structure provided by oneTBB instead of one composed with a shared mutex and an unordered map. Additionally, the switch to Fibonacci hashing means that threads are less likely to collide on the map shard indexes.
Finally, no additional test failures were observed.