Skip to content

Commit bf5b21d

Browse files
committed
bench 8
1 parent 8de66cb commit bf5b21d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

bitmap_conc_test.go

+22
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,28 @@ func Benchmark_And_Alt(b *testing.B) {
6262
}
6363
}
6464

65+
// go test -v -bench Benchmark_And_Buf -benchmem -run ^$ github.com/weaviate/sroar -cpuprofile cpu.prof
66+
func Benchmark_And_Buf(b *testing.B) {
67+
for i := 0; i < b.N; i++ {
68+
bm := superset.Clone()
69+
buf := make([]uint16, maxContainerSize)
70+
for j, l := 0, len(subsets); j < l; j++ {
71+
bm.AndBuf(subsets[j], buf)
72+
}
73+
}
74+
}
75+
76+
// go test -v -bench Benchmark_And_Buf -benchmem -run ^$ github.com/weaviate/sroar -cpuprofile cpu.prof
77+
func Benchmark_And_Buf2(b *testing.B) {
78+
buf := make([]uint16, maxContainerSize)
79+
for i := 0; i < b.N; i++ {
80+
bm := superset.Clone()
81+
for j, l := 0, len(subsets); j < l; j++ {
82+
bm.AndBuf(subsets[j], buf)
83+
}
84+
}
85+
}
86+
6587
// var bm *Bitmap
6688
// var control []uint64
6789
// var controls [][]uint64

0 commit comments

Comments
 (0)