disruptek / skiplists

generic skip list implementations💃

Home Page:https://en.wikipedia.org/wiki/Skip_list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skiplists

Test Matrix GitHub release (latest by date) Minimum supported Nim version License buy me a coffee

A skip list is an ordered linked-list. Skip lists can be stacked such that a shorter parent skip list can serve as an index into a larger child list. In this implementation, such a stack is itself a skip list, as is each element.

Benefits

Varying the ratio of parent to child length trades space for speed. This trade-off can be made dynamically while the skip list is in use and it can vary across different regions of the skip list or even individual values. Skip lists are friendly to concurrent modification with minimal or localized locking.

For more details, see the Wikipedia article on Skip Lists.

Installation

$ git submodule add https://github.com/disruptek/skiplists
$ echo '--path="$config/skiplists/"' >> nim.cfg

Documentation

See the documentation for the skiplists module as generated directly from the source.

Testing

There's a test and a benchmark under tests/; the benchmark requires criterion.

License

MIT

About

generic skip list implementations💃

https://en.wikipedia.org/wiki/Skip_list

License:MIT License


Languages

Language:Nim 100.0%