Closed noamteyssier closed 8 months ago
Looks like rustfmt also failed, can you please run cargo fmt
?
Thinking a bit more on this, I don't think it's a good idea to have this in terms of API consistency, and this can be implemented via FixedBitset::as_mut_slice
and FixedBitset::as_slice
.
Hey all,
Love the library and am using it in a project where I am performing a very high number of
union_with
calls onFixedBitSet
s of equal length of fairly small size (i.e. N $\approx$ 1000).I know that they are the same length every time so the extra branching in the
if
statement checking if they are equal sizes is adding overhead that could be cut. Not sure if you all are interested in including, but I found it to be very helpful in my project and made a fairly substantial optimization.The effect is fairly small for larger bitsets (1M) but is significant once the size gets much smaller.
Here are the benchmarks:
N = 1k
N = 1M