Get the latest tech news

Parallel-hashmap: drop-in replacement for unordered_map, unordered_set


A family of header-only, very fast and memory-friendly hashmap and btree containers. - greg7mdp/parallel-hashmap

The parallel tables can be made internally thread-safe for concurrent read and write access, by providing a synchronization type (for example std::mutex) as the last template argument. However, please be aware that iterators or references returned by standard APIs are not protected by the mutex, so they cannot be used reliably on a hash map which can be changed by another thread. Many thanks to the Abseil developers for implementing the swiss table and btree data structures (see abseil-cpp) upon which this work is based, and to Google for releasing it as open-source.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Drop

Drop

Photo of replacement

replacement

Photo of hashmap

hashmap

Related news:

News photo

Building a replacement 386/486 CMOS battery

News photo

A Replacement for BERT

News photo

Using Drop for safety in Rust