Open modulovalue opened 10 months ago
I'm not sure how the change explains 300+ ms of runtime, but yeah, of course, we shall change it.
I'm not sure how the change explains 300+ ms of runtime
One of the masks is used by setBit
and I suppose there's some inefficiency that adds up.
Note: CRoaring doesn't use tables for its setBit operation, but bit ops directly. That might be faster, I'm not sure, but with baked lists it's fast enough for my use case so I've not investigated that further.
Consider the
_bitMask
and_clearMask
masks:We can bake them into constant lists:
This appears to be a clear improvement (especially when it comes to AOT):
I din't bother with
_cardinalityBitCounts
because of #20.@isoos what do you think?