Skip to content

Commit

Permalink
Added performance tip.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Dec 25, 2022
1 parent 43ed84f commit 442fb2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fastaggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func (x1 *Bitmap) repairAfterLazy() {
// FastAnd computes the intersection between many bitmaps quickly
// Compared to the And function, it can take many bitmaps as input, thus saving the trouble
// of manually calling "And" many times.
//
// Performance hints: if you have very large and tiny bitmaps,
// it may be beneficial performance-wise to put a tiny bitmap
// in first position.
func FastAnd(bitmaps ...*Bitmap) *Bitmap {
if len(bitmaps) == 0 {
return NewBitmap()
Expand Down

0 comments on commit 442fb2e

Please sign in to comment.