Skip to content

Commit

Permalink
Refactor IntSets to use BitVectors
Browse files Browse the repository at this point in the history
* Use BitVectors instead of a mismash of bitvector.c and ad-hoc Julia code.
* Invert the complement IntSet semantics.  Instead of filling ones outside the range of the IntSet, simply reverse what a set bit means.
* For mathematical functions (intersect, union, etc.), use BitVector functions to work 64 bits at a time instead of working bit-by-bit.
* Increase test-coverage to 100%
  • Loading branch information
mbauman committed May 20, 2015
1 parent ec9f645 commit 5a53338
Show file tree
Hide file tree
Showing 6 changed files with 459 additions and 306 deletions.
1 change: 1 addition & 0 deletions base/coreimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ include("functors.jl")
include("reduce.jl")

## core structures
include("bitarray.jl")
include("intset.jl")
include("dict.jl")
include("iterator.jl")
Expand Down
1 change: 0 additions & 1 deletion base/hashing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ else
hash(x::Expr, h::UInt) = hash(x.args, hash(x.head, h + 0x96d26dc6))
end


# hashing ranges by component at worst leads to collisions for very similar ranges
const hashr_seed = UInt === UInt64 ? 0x80707b6821b70087 : 0x21b70087
function hash(r::Range, h::UInt)
Expand Down
Loading

0 comments on commit 5a53338

Please sign in to comment.