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

Function BenchmarkBitArrayToNums

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

Source from the content-addressed store, hash-verified

538}
539
540func BenchmarkBitArrayToNums(b *testing.B) {
541 numItems := uint64(1000)
542 ba := newBitArray(numItems)
543
544 for i := uint64(0); i < numItems; i++ {
545 ba.SetBit(i)
546 }
547
548 b.ResetTimer()
549 for i := 0; i < b.N; i++ {
550 ba.ToNums()
551 }
552}

Callers

nothing calls this directly

Calls 3

newBitArrayFunction · 0.85
SetBitMethod · 0.65
ToNumsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…