MCPcopy Index your code
hub / github.com/Workiva/go-datastructures / BenchmarkCompressedIntersects

Function BenchmarkCompressedIntersects

bitarray/sparse_bitarray_test.go:264–280  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

262}
263
264func BenchmarkCompressedIntersects(b *testing.B) {
265 numItems := uint64(1000)
266
267 ba := newSparseBitArray()
268 other := newSparseBitArray()
269
270 for i := uint64(0); i < numItems; i++ {
271 ba.SetBit(i)
272 other.SetBit(i)
273 }
274
275 b.ResetTimer()
276
277 for i := 0; i < b.N; i++ {
278 ba.Intersects(other)
279 }
280}
281
282func TestSparseIntersectsBitArray(t *testing.T) {
283 cba := newSparseBitArray()

Callers

nothing calls this directly

Calls 3

newSparseBitArrayFunction · 0.85
SetBitMethod · 0.65
IntersectsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…