mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
a02553815f
* Allocate the appropriate memory for retrieveIndicesFromBitfield * Merge refs/heads/master into memory0 * Merge refs/heads/master into memory0 * Merge refs/heads/master into memory0 * Merge refs/heads/master into memory0 * Merge refs/heads/master into memory0 * Merge refs/heads/master into memory0 * Merge refs/heads/master into memory0
19 lines
321 B
Go
19 lines
321 B
Go
package peers
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/go-bitfield"
|
|
)
|
|
|
|
func Benchmark_retrieveIndicesFromBitfield(b *testing.B) {
|
|
bv := bitfield.NewBitvector64()
|
|
for i := uint64(0); i < bv.Len(); i++ {
|
|
bv.SetBitAt(i, true)
|
|
}
|
|
b.ResetTimer()
|
|
for i := 0; i < b.N; i++ {
|
|
retrieveIndicesFromBitfield(bv)
|
|
}
|
|
}
|