Skip to content

Commit 8cd82d8

Browse files
authored
Merge pull request #283 from RoaringBitmap/dlemire/do_not_hardcode
Minor tweak.
2 parents 9e37418 + a97bea2 commit 8cd82d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arraycontainer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ func (ac *arrayContainer) iorArray(value2 *arrayContainer) container {
366366
// the second check is to handle overly large array containers
367367
// and should not occur in normal usage,
368368
// as all array containers should be at most arrayDefaultMaxSize
369-
if newSize > 8192 && maxPossibleCardinality <= 8192 {
370-
newSize = 8192
369+
if newSize > 2*arrayDefaultMaxSize && maxPossibleCardinality <= 2*arrayDefaultMaxSize {
370+
newSize = 2 * arrayDefaultMaxSize
371371
}
372372
newcontent := make([]uint16, 0, newSize)
373373
copy(newcontent[len2:maxPossibleCardinality], ac.content[0:len1])

0 commit comments

Comments
 (0)