All Projects → bhhbazinga → LockFreeHashTable

bhhbazinga / LockFreeHashTable

Licence: other
Lock Free Resizable Hash Table Based On Split-Ordered Lists.

Programming Languages

C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to LockFreeHashTable

Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+1433.33%)
Mutual labels:  thread, lock-free
hatrack
Fast, multi-reader, multi-writer, lockless data structures for parallel programming
Stars: ✭ 55 (+22.22%)
Mutual labels:  lock-free, hashtable
uniq
A lock-free (multi reader / multi writer) circular buffered queue.
Stars: ✭ 32 (-28.89%)
Mutual labels:  thread, lock-free
Pelagia
Automatic parallelization (lock-free multithreading thread) tool developed by Surparallel Open Source.Pelagia is embedded key value database that implements a small, fast, high-reliability on ANSI C.
Stars: ✭ 1,132 (+2415.56%)
Mutual labels:  thread, lock-free
CPU-MEM-monitor
A simple script to log Linux CPU and memory usage (using top or pidstat command) over time and output an Excel- or OpenOfficeCalc-friendly report
Stars: ✭ 41 (-8.89%)
Mutual labels:  thread
GeekThread
Android ThreadPool的封装
Stars: ✭ 97 (+115.56%)
Mutual labels:  thread
theater
Actor framework for Dart. This package makes it easier to work with isolates, create clusters of isolates.
Stars: ✭ 29 (-35.56%)
Mutual labels:  thread
HiFramework.Unity
Based on component to manage project's core logic and module used in unity3d
Stars: ✭ 22 (-51.11%)
Mutual labels:  thread
tgrid
TypeScript Grid Computing Framework supporting RFC (Remote Function Call)
Stars: ✭ 83 (+84.44%)
Mutual labels:  thread
fastthreadpool
An efficient and lightweight thread pool
Stars: ✭ 27 (-40%)
Mutual labels:  thread
sharded-slab
a lock-free concurrent slab (experimental)
Stars: ✭ 116 (+157.78%)
Mutual labels:  lock-free
MemoryAllocator.KanameShiki
Fast multi-threaded memory allocator
Stars: ✭ 73 (+62.22%)
Mutual labels:  lock-free
lfqueue
Minimize lock-free queue ever!
Stars: ✭ 107 (+137.78%)
Mutual labels:  lock-free
ADbHash
Really fast C++ hash table
Stars: ✭ 12 (-73.33%)
Mutual labels:  hashtable
CS302-Operating-System
OS course of SUSTech
Stars: ✭ 18 (-60%)
Mutual labels:  thread
tiket
TIKET is a ticketing/helpdesk system to support and help you deal with issues/incidents in your organization or from customers.
Stars: ✭ 59 (+31.11%)
Mutual labels:  thread
isolate handler
Effortless isolates abstraction layer with support for MethodChannel calls.
Stars: ✭ 29 (-35.56%)
Mutual labels:  thread
event-worker
A simpler way of dealing with Web Workers
Stars: ✭ 18 (-60%)
Mutual labels:  thread
bikeshed
Lock free hierarchical work scheduler
Stars: ✭ 78 (+73.33%)
Mutual labels:  lock-free
FPGrowth-and-Apriori-algorithm-Association-Rule-Data-Mining
Implementation of FPTree-Growth and Apriori-Algorithm for finding frequent patterns in Transactional Database.
Stars: ✭ 19 (-57.78%)
Mutual labels:  hashtable

LockFreeHashTable

Lock Free Resizable Hash Table Based On Split-Ordered Lists.

Feature

  • Thread-safe and Lock-free.
  • ABA safe.
  • Support Multi-producer & Multi-consumer.
  • Use Hazard Pointer to manage memory.
  • Lock Free LinkedList base on Harris' ListBasedSet, see also LockFreeLinkedList
  • Resize without waiting.

Benchmark

Magnitude Insert Find Delete Insert&Find&Delete
10K 7.8ms 1.6ms 2.1ms 10.4ms
100K 74.9ms 13.4ms 18.4ms 111.2ms
1000K 961ms 117.8ms 216.1ms 1264.1ms

The above data was tested on my 2013 macbook-pro with Intel Core i7 4 cores 2.3 GHz.

The data of first three column was obtained by starting 8 threads to insert concurrently, find concurrently, delete concurrently, the data of four column was obtained by starting 2 threads to insert, 2 threads to find, 2 threads to delete concurrently, each looped 10 times to calculate the average time consumption. See also test.

Build

make && ./test

API

bool Insert(const K& key, const V& value);
bool Insert(const K& key, V&& value);
bool Insert(K&& key, const V& value);
bool Insert(K&& key, V&& value);
bool Find(const K& key, V& value);
bool Delete(const T& data);
size_t size() const;

TODO List

  • Shrink Hash Table without waiting.

Reference

[1]A Pragmatic Implementation of Non-BlockingLinked-Lists. Timothy L.Harris
[2]Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. Maged M. Michael
[3]Split-Ordered Lists: Lock-Free Extensible Hash Tables. Tel-Aviv University and Sun Microsystems Laboratories, Tel-Aviv, Israel

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].