Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.72 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.72 KB

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