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.
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.
$ git submodule add https://github.com/disruptek/skiplists
$ echo '--path="$config/skiplists/"' >> nim.cfg
See the documentation for the skiplists module as generated directly from the source.
There's a test and a benchmark under tests/
; the benchmark requires
criterion.
MIT