amethyst / hibitset

Hierarchical bit set container
Other
117 stars 32 forks source link

Speed compared to fixedbitset #58

Closed cisaacson closed 4 years ago

cisaacson commented 4 years ago

I have a use case with 100K bits, where I need to so simple AND/OR operations. It would seem based on the layer design that hibitset would be faster than fixedbitset.

Any advice on this?

WaDelma commented 4 years ago

You should always benchmark things like this (preferably with something like criterion). It probably depends only how sparse the bitsets are and how you then eventually consume the information which bits are active.

Please do post your benchmark results if you create any :D

cisaacson commented 4 years ago

Thanks, I will perform some benchmarks once we accumulate more data. It's an interesting problem, the bitsets will start out very sparse and then as we progress in processing they will be more dense, potentially up to full density. However, most of the processing is on the sparse bitsets, so that's why I think hibitset will win. I'll post something once I have conclusive results.