hi_sparse_bitset icon indicating copy to clipboard operation
hi_sparse_bitset copied to clipboard

Benchmark panics

Open jpochyla opened this issue 8 months ago • 2 comments

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!

jpochyla avatar Apr 18 '25 23:04 jpochyla

I'll take a look at it. Sorry for delay.

tower120 avatar Apr 24 '25 15:04 tower120

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

tower120 avatar Apr 24 '25 16:04 tower120

On main branch and in release now.

tower120 avatar Jul 28 '25 21:07 tower120