MCPcopy Create free account
hub / github.com/Workiva/go-datastructures / BenchmarkDenseIntersectsCompressed

Function BenchmarkDenseIntersectsCompressed

bitarray/bitarray_test.go:510–525  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

508}
509
510func BenchmarkDenseIntersectsCompressed(b *testing.B) {
511 numBits := uint64(162432)
512 ba := newBitArray(numBits)
513 other := newSparseBitArray()
514
515 for i := uint64(0); i < numBits; i++ {
516 ba.SetBit(i)
517 other.SetBit(i)
518 }
519
520 b.ResetTimer()
521
522 for i := 0; i < b.N; i++ {
523 ba.intersectsSparseBitArray(other)
524 }
525}
526
527func TestBitArrayToNums(t *testing.T) {
528 ba := newBitArray(s * 2)

Callers

nothing calls this directly

Calls 4

newBitArrayFunction · 0.85
newSparseBitArrayFunction · 0.85
SetBitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…