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

Function BenchmarkCompressedEquals

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

Source from the content-addressed store, hash-verified

324}
325
326func BenchmarkCompressedEquals(b *testing.B) {
327 numItems := uint64(1000)
328 cba := newSparseBitArray()
329 other := newSparseBitArray()
330
331 for i := uint64(0); i < numItems; i++ {
332 cba.SetBit(i)
333 other.SetBit(i)
334 }
335
336 b.ResetTimer()
337
338 for i := 0; i < b.N; i++ {
339 cba.Equals(other)
340 }
341}
342
343func TestInsertPreviousBlockInSparse(t *testing.T) {
344 sba := newSparseBitArray()

Callers

nothing calls this directly

Calls 3

newSparseBitArrayFunction · 0.85
SetBitMethod · 0.65
EqualsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…