Skip to content

Commit

Permalink
Merge pull request #283 from RoaringBitmap/dlemire/do_not_hardcode
Browse files Browse the repository at this point in the history
Minor tweak.
  • Loading branch information
lemire authored Oct 21, 2020
2 parents 9e37418 + a97bea2 commit 8cd82d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arraycontainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ func (ac *arrayContainer) iorArray(value2 *arrayContainer) container {
// the second check is to handle overly large array containers
// and should not occur in normal usage,
// as all array containers should be at most arrayDefaultMaxSize
if newSize > 8192 && maxPossibleCardinality <= 8192 {
newSize = 8192
if newSize > 2*arrayDefaultMaxSize && maxPossibleCardinality <= 2*arrayDefaultMaxSize {
newSize = 2 * arrayDefaultMaxSize
}
newcontent := make([]uint16, 0, newSize)
copy(newcontent[len2:maxPossibleCardinality], ac.content[0:len1])
Expand Down

0 comments on commit 8cd82d8

Please sign in to comment.