Skip to content

Generic lock-free Skiplist container pure C implementation, STL-style set, map

License

Notifications You must be signed in to change notification settings

mzygQAQ/skiplist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skiplist

A generic Skiplist container C implementation, lock-free for both multiple readers and writers. It can be used as a set or a map, containing any type of data.

It basically uses STL atomic variables with C++ compiler, but they can be switched to built-in GCC atomic operations when we compile it with pure C compiler.

This repository also includes STL-style lock-free set and map containers, based on Skiplist implementation.

Author

Jung-Sang Ahn [email protected]

Build

$ make

How to use

  • Pure C

examples/pure_c_example.c

  • C++ (STL-style set and map)

examples/cpp_container_example.cc

Benchmark results

  • Skiplist vs. STL set + STL mutex
  • Single writer and multiple readers
  • Randomly insert and read 100K integers

alt text

About

Generic lock-free Skiplist container pure C implementation, STL-style set, map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.4%
  • C 2.5%
  • Makefile 1.1%