mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 22:51:02 +00:00
Add benchmark
This commit is contained in:
parent
6d021fe870
commit
42e756b316
1 changed files with 21 additions and 0 deletions
|
|
@ -3267,6 +3267,27 @@ func TestUnmarshalOfficialRoaring(t *testing.T) {
|
|||
|
||||
}
|
||||
|
||||
func BenchmarkUnionBitmapBitmapInPlace(b *testing.B) {
|
||||
b1 := newTestBitmapContainer()
|
||||
b2 := newTestBitmapContainer()
|
||||
for n := 0; n < b.N; n++ {
|
||||
unionBitmapBitmapInPlace(b1, b2)
|
||||
}
|
||||
}
|
||||
|
||||
func newTestBitmapContainer() *Container {
|
||||
var (
|
||||
buf = make([]uint64, bitmapN)
|
||||
ob = buf[:bitmapN]
|
||||
container = &Container{
|
||||
bitmap: ob,
|
||||
n: 0,
|
||||
containerType: containerBitmap,
|
||||
}
|
||||
)
|
||||
return container
|
||||
}
|
||||
|
||||
/*
|
||||
// This function exercises an arcane edge case in dead code.
|
||||
// It doesn't need to be run right now.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue