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

Refactor IntSets #20456

Merged
merged 4 commits into from
Feb 7, 2017
Merged

Refactor IntSets #20456

merged 4 commits into from
Feb 7, 2017

Commits on Feb 4, 2017

  1. Refactor IntSets

    * Complete deprecation of stored zeros; IntSets now only support integers in the range `1:typemax(Int)`
    * Complete deprecation of `complement`; removes all support for inverted IntSets
    * Refactor internals to rely on a BitVector, allowing the use of highly optimized `map` methods. `IntSet` is now immutable. This significantly improves performance across varying [densities](http://imgur.com/a/uqv8A) and [sizes](http://imgur.com/a/iEgcr). These are compared against a modified Base with deprecation warnings removed for a fairer comparison. Testing code [available here](https://github.com/mbauman/IntSets.jl/tree/b50a7c97abbe9786e33221f723e107e266f31fe4/test).
    * Add more tests and organize into testsets.
    * Improve hashing; `hash(IntSet([1]))` is now distinct from `hash(IntSet([65]))`
    
    This is a continuation of #10065. Now that complements are fully removed, making IntSet immutable solves the performance issue. I am keeping the name the same within this PR as it vastly simplifies comparisons between the two implementations; the name can later be changed to `IndexSet` if still desired. The naming story is now a bit more complicated since we support offset indices, but a future change could perhaps allow wrapping any `AbstractVector{Bool}` and base the supported `Int`s on those indices. Very few methods depend upon BitArray internals.
    mbauman committed Feb 4, 2017
    Configuration menu
    Copy the full SHA
    0be5cda View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2017

  1. Configuration menu
    Copy the full SHA
    bb3198a View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2017

  1. Configuration menu
    Copy the full SHA
    bb78c47 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    651d3df View commit details
    Browse the repository at this point in the history