Skip to content

disruptek/skiplists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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