As part of a larger task I need to count the number of elements in the union of a set of intervals. A sample set of intervals from genomic sequences and a function to evaluate the overlap size is in
bugreport.txt
I get inconsistent results
ulia> overlapsz(rngs)
8833
julia> overlapsz(rngs)
10413
julia> overlapsz(rngs)
8663
julia> versioninfo()
Julia Version 1.8.0-rc1
Commit 6368fdc656 (2022-05-27 18:33 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 8 × 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, tigerlake)
Threads: 8 on 8 virtual cores
I suspect that somewhere in the union!(s::BitSet, r::AbstractUnitRange{<:Integer}) method starting at line 126 of bitset.jl the bits vector of s is being extended without zeroing the extending part.