MCPcopy
hub / github.com/Workiva/go-datastructures / BenchmarkGetCompressedBit

Function BenchmarkGetCompressedBit

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

Source from the content-addressed store, hash-verified

32}
33
34func BenchmarkGetCompressedBit(b *testing.B) {
35 numItems := 1000
36 ba := newSparseBitArray()
37
38 for i := 0; i < numItems; i++ {
39 ba.SetBit(uint64(i))
40 }
41
42 b.ResetTimer()
43
44 for i := 0; i < b.N; i++ {
45 ba.GetBit(s)
46 }
47}
48
49func TestGetSetCompressedBit(t *testing.T) {
50 ba := newSparseBitArray()

Callers

nothing calls this directly

Calls 3

newSparseBitArrayFunction · 0.85
SetBitMethod · 0.65
GetBitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…