fast-skiplist | A fast , threadsafe skip list in Go

 by   sean-public Go Version: Current License: MIT

kandi X-RAY | fast-skiplist Summary

kandi X-RAY | fast-skiplist Summary

fast-skiplist is a Go library. fast-skiplist has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

"Perfection is achieved not when there is nothing more to add, but rather when there is nothing more to take away" — Antoine de Saint-Exupery. If fast-skiplist is faster than other packages with the same features, it's because it does less wherever possible. It locks less, it blocks less, and it traverses less data. Even with these tricks up its sleeve, it has fewer lines of code than most implementations. When inserting, it calculates "height" directly instead of consecutive "coin tosses" to add levels. Additionally, it uses a local PRNG source that isn't blocked globally for improved concurrent insert performance. The probability of adding new nodes to each level of the structure (it's height) is determined by successively "rolling the dice" at each level until it doesn't meet a fixed value P. The default P values for skip lists in the wild range from 0.25 to 0.5. In this implementation, the default is 1/e, which is optimal for a general-purpose skip list. To find the derivation of this number, see Analysis of an optimized search algorithm for skip lists Kirschenhofer et al (1995). Almost all other implementations are using common functions in math/rand, which will block because querying the PRNG to determine the height of new nodes waits then acquires a lock via the system-wide random number generator. We get around this by assigning a new rand source to each skip list instantiated, so each skip list can only ever block itself. This significantly speeds up insert times when you are managing multiple lists with high concurrency. Additionally, this implementation always requests just one number from the PRNG. A pre-computed probability table is used to look up what the height of the new node will be. This is faster and offers a fixed calculation time compared to successive "dice rolls" for each level. The table is computed for each level L using the default P value of 1/e: math.Pow(1.0/math.E, L-1). It is consulted during inserts by querying for a random number in range [0.0,1.0) and finding the highest level in the table where the random number is less than or equal to the computed number.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fast-skiplist has a low active ecosystem.
              It has 253 star(s) with 50 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 11 have been closed. On average issues are closed in 60 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of fast-skiplist is current.

            kandi-Quality Quality

              fast-skiplist has no bugs reported.

            kandi-Security Security

              fast-skiplist has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              fast-skiplist is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              fast-skiplist releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fast-skiplist
            Get all kandi verified functions for this library.

            fast-skiplist Key Features

            No Key Features are available at this moment for fast-skiplist.

            fast-skiplist Examples and Code Snippets

            No Code Snippets are available at this moment for fast-skiplist.

            Community Discussions

            No Community Discussions are available at this moment for fast-skiplist.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fast-skiplist

            To start using the library right away, just do:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/sean-public/fast-skiplist.git

          • CLI

            gh repo clone sean-public/fast-skiplist

          • sshUrl

            git@github.com:sean-public/fast-skiplist.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Go Libraries

            go

            by golang

            kubernetes

            by kubernetes

            awesome-go

            by avelino

            moby

            by moby

            hugo

            by gohugoio

            Try Top Libraries by sean-public

            RecipeFilter

            by sean-publicJavaScript

            python-hashes

            by sean-publicPython

            skiplist-survey

            by sean-publicGo

            pharmacist

            by sean-publicPython

            gstack

            by sean-publicPython