hi_sparse_bitset
hi_sparse_bitset copied to clipboard
Benchmark panics
Running benchmarks with:
cargo bench --features simple_iter
fails with the following error:
Benchmarking hi_sparse_bitset insert: Warming up for 3.0000 s
thread 'main' panicked at .../hi_sparse_bitset/src/raw.rs:141:9:
2080768 index out of range!
I'll take a look at it. Sorry for delay.
The reason for that, is that max range for 128bit container is actually 127^3, not 128^3. At each level one block occupied for "empty" pointers (for performance reasons - to avoid branching).
In SmallBitSet that additional is actually not allocated, but max_capacity() calculated the same way as in BitSet - for code simplicity.
Fix on dev branch now
On main branch and in release now.