Skip to content

Commit fc14622

Browse files
authored
Merge pull request #464 from dominiquelefevre/fewer-allocations-in-iandNotRunContainer16
runcontainer: make fewer memory allocations in iandNotRunContainer16().
2 parents 84c242d + cdb209e commit fc14622

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

runcontainer.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,12 +2464,8 @@ func (rc *runContainer16) toBitmapContainer() *bitmapContainer {
24642464
}
24652465

24662466
func (rc *runContainer16) iandNotRunContainer16(x2 *runContainer16) container {
2467-
rcb := rc.toBitmapContainer()
2468-
x2b := x2.toBitmapContainer()
2469-
rcb.iandNotBitmapSurely(x2b)
24702467
// TODO: check size and optimize the return value
2471-
// TODO: is inplace modification really required? If not, elide the copy.
2472-
rc2 := newRunContainer16FromBitmapContainer(rcb)
2468+
rc2 := rc.AndNotRunContainer16(x2)
24732469
*rc = *rc2
24742470
return rc
24752471
}

0 commit comments

Comments
 (0)