You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These intersections could be optimized if the blocks BTreeSet was represented with a bitset. Essentially, the blocks are always in the from_block..=to_block range, so each block can be represented as a bit, where the ith bit is on if the block from_block + i is present in the set. Then the intersection, cloned, and collect calls can be turned into a simple and operation on the bitsets.
This might not actually make a difference in practice, so we should measure carefully after doing this to decide if it's worth it.
The text was updated successfully, but these errors were encountered:
These intersections could be optimized if the blocks
BTreeSet
was represented with a bitset. Essentially, the blocks are always in thefrom_block..=to_block
range, so each block can be represented as a bit, where thei
th bit is on if the blockfrom_block + i
is present in the set. Then theintersection
,cloned
, andcollect
calls can be turned into a simpleand
operation on the bitsets.This might not actually make a difference in practice, so we should measure carefully after doing this to decide if it's worth it.
The text was updated successfully, but these errors were encountered: