Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Skip Lists #60

Open
sean-public opened this issue Jul 16, 2017 · 4 comments
Open

Add Skip Lists #60

sean-public opened this issue Jul 16, 2017 · 4 comments

Comments

@sean-public
Copy link

I think it would be useful to have skip lists included in the GoDS collection.

I previously studied the publicly available Go skip list implementations and found some issues with each. I then created a very fast, threadsafe skip list of my own (under MIT license). I believe it is one of the best foundations to work from for this data structure and can easily be integrated into GoDS.

If you like, I can work on a pull request to include my skip list implementation with the appropriate interface. First, I wanted to make sure this would be useful and to ask what specific details I should watch for / include to ensure smooth compatibility.

@emirpasic
Copy link
Owner

Any new data structure is a good addition to GoDS, so I might use parts of your code as inspiration to create SkipLists.

Regarding thread-safety, GoDS tries to keep its hands clean from that problem and that should be handled on another abstaction level with mutex or whichever... repeat #68 #84 (also noted in the documentation and comments)

@emirpasic
Copy link
Owner

@sean-public i took a brief look at your implementation and testing various implementations. i think you have done a good job and would like to move from there.

however, two things i would change due to nature of GoDS which despite trying to stay un-opinionated, things took a path.

  1. i would remove the locking mechanisms as pointed in the documentation and frequently answered questions, it is something i believe that should be easily handled on a higher level with rw/mutexes.
  2. it is under the MIT license. although MIT and BSD are somewhat compatible, would it be possible to convert your MIT to BSD. i am honestly really not dogmatic about any of the two, but would not like to confuse others with having two licences in GoDS. note that i am also not a legal expert on the issue. in that case i would simply attach your BSD licence to https://github.com/emirpasic/gods/blob/master/LICENSE as done with the AVL tree implementation.

do these two suggestions sound reasonable?

@tooooolong
Copy link

@sean-public May I help with this

@sean-public
Copy link
Author

It has been a few years, let me review everything and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants