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

Remove SortedSet implementations #2

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Remove SortedSet implementations #2

merged 1 commit into from
Sep 21, 2020

Conversation

knu
Copy link
Member

@knu knu commented Sep 21, 2020

It required RBTree to perform decently and the external dependency was not suitable for a standard library. The pure ruby fallback implementation was originally meant to be a demonstration of how to write a subclass of Set, and its poor performance was not suitable for use in production.

I decided it should be distributed as an external library instead of bundling it with Set.

It required RBTree to perform decently and the external dependency was
not suitable for a standard library.  The pure ruby fallback
implementation was originally meant to be an example of how to write a
subclass of Set, and its poor performance was not suitable for use in
production.

I decided it should be distributed as an external library instead of
bundling it with Set.
@ioquatix
Copy link
Member

I completely agree, and it's performance is not great.

@knu knu merged commit bddcf30 into master Sep 21, 2020
@knu knu deleted the remove_sorted_set branch September 21, 2020 03:01
@marcandre
Copy link
Member

marcandre commented Sep 21, 2020

I don't know if these are used much or at all (I notice that there's a typo in the class RestricedSet!), but nevertheless, maybe it would be a good idea to keep compatibility for one full version of Ruby? We could use autoload on both SortedSet and RestricedSet to load a different file that could issue a warning, and remove that for Ruby 3.1. The external library should be available now too (containing the same code) and this would make for a nice transition period for anyone using SortedSet

@knu
Copy link
Member Author

knu commented Dec 22, 2020

Just pushed sorted_set 1.0.0: https://rubygems.org/gems/sorted_set

alissa-huskey added a commit to alissa-huskey/skippy that referenced this pull request Aug 6, 2022
SortedSet is extracted into its own gem in Ruby 3+, as per ruby/set#2.
alissa-huskey added a commit to alissa-huskey/skippy that referenced this pull request Aug 6, 2022
SortedSet is extracted into its own gem in Ruby 3+, as per ruby/set#2.
alissa-huskey added a commit to alissa-huskey/skippy that referenced this pull request Aug 6, 2022
Add sorted_set gem to Gemfile

SortedSet is extracted into its own gem in Ruby 3+, as per ruby/set#2.
alissa-huskey added a commit to alissa-huskey/skippy that referenced this pull request Aug 6, 2022
Add sorted_set gem to Gemfile

SortedSet is extracted into its own gem in Ruby 3+, as per ruby/set#2.
alissa-huskey added a commit to alissa-huskey/skippy that referenced this pull request Aug 6, 2022
SortedSet is extracted into its own gem in Ruby 3+, as per ruby/set#2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants