0
0
Fork 0

scorch zap build prealloc docNumbers capacity

This commit is contained in:
Steve Yen 2018-03-04 12:06:45 -08:00
parent 8c0881eab2
commit 856778ad7b
1 changed files with 1 additions and 1 deletions

View File

@ -570,7 +570,7 @@ func persistDocValues(memSegment *mem.Segment, w *CountHashWriter,
}
// sort wrt to docIDs
var docNumbers docIDRange
docNumbers := make(docIDRange, 0, len(docTermMap))
for k := range docTermMap {
docNumbers = append(docNumbers, k)
}