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

Function BenchmarkClearCompressedBit

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

Source from the content-addressed store, hash-verified

165}
166
167func BenchmarkClearCompressedBit(b *testing.B) {
168 numItems := 1000
169 ba := newSparseBitArray()
170 for i := 0; i < numItems; i++ {
171 ba.SetBit(uint64(i))
172 }
173
174 b.ResetTimer()
175
176 for i := 0; i < b.N; i++ {
177 ba.ClearBit(uint64(i))
178 }
179}
180
181func TestClearCompressedBitArray(t *testing.T) {
182 ba := newSparseBitArray()

Callers

nothing calls this directly

Calls 3

newSparseBitArrayFunction · 0.85
SetBitMethod · 0.65
ClearBitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…