MCPcopy
hub / github.com/RoaringBitmap/roaring / BenchmarkRealDataNextMany

Function BenchmarkRealDataNextMany

real_data_benchmark_test.go:155–169  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

153}
154
155func BenchmarkRealDataNextMany(b *testing.B) {
156 benchmarkRealDataAggregate(b, func(bitmaps []*Bitmap) uint64 {
157 tot := uint64(0)
158 buf := make([]uint32, 4096)
159 for _, b := range bitmaps {
160 it := b.ManyIterator()
161 for n := it.NextMany(buf); n != 0; n = it.NextMany(buf) {
162 for _, v := range buf[:n] {
163 tot += uint64(v)
164 }
165 }
166 }
167 return tot
168 })
169}
170
171func BenchmarkRealDataParOr(b *testing.B) {
172 benchmarkRealDataAggregate(b, func(bitmaps []*Bitmap) uint64 {

Callers

nothing calls this directly

Calls 3

NextManyMethod · 0.65
ManyIteratorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…