0
0

scorch introducer uses the roaring.Or(x, y) API

Instead of cloning an input bitmap, the roaring.Or(x, y)
implementation fills a brand new result bitmap, which should be allow
for more efficient packing and memory utilization.
This commit is contained in:
Steve Yen 2017-11-30 10:37:02 -08:00
parent 67986d41bf
commit 398dcb19b3

View File

@ -49,8 +49,7 @@ func (s *Scorch) mainLoop() {
if s.root.segment[i].deleted == nil {
newSnapshot.segment[i].deleted = delta
} else {
newSnapshot.segment[i].deleted = s.root.segment[i].deleted.Clone()
newSnapshot.segment[i].deleted.Or(delta)
newSnapshot.segment[i].deleted = roaring.Or(s.root.segment[i].deleted, delta)
}
newSnapshot.offsets[i] = running