mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-11 05:17:54 +00:00
extended bitmap.optimize() to look at run containers
This commit is contained in:
parent
bed7b41faf
commit
43c275c6e2
1 changed files with 6 additions and 1 deletions
|
|
@ -1328,10 +1328,15 @@ func (c *container) Optimize() {
|
|||
}
|
||||
} else if c.isBitmap() {
|
||||
runs := c.bitmapCountRuns()
|
||||
if runs < 2048 {
|
||||
if runs < RunMaxSize {
|
||||
c.bitmapToRun()
|
||||
}
|
||||
} else if c.isRun() {
|
||||
if len(c.runs) > RunMaxSize {
|
||||
c.runToBitmap()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (c *container) arrayContains(v uint32) bool {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue