MCPcopy Create free account
hub / github.com/egonelbre/exp / BenchmarkUnrollInReverseBool

Function BenchmarkUnrollInReverseBool

niterator/iterator_test.go:492–508  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

490}
491
492func BenchmarkUnrollInReverseBool(b *testing.B) {
493 for api, testsize := range testSizes {
494 b.Run(testsize.Name, func(b *testing.B) {
495 verify := verifyIndex[api]
496 ap := testsize.AP
497 b.SetBytes(int64(ap.TotalSize()))
498 for i := 0; i < b.N; i++ {
499 it := unrollinreversebool.NewIterator(ap)
500 total := 0
501 for index, done := it.Next(); !done; index, done = it.Next() {
502 total += verify[index] * index
503 }
504 _ = total
505 }
506 })
507 }
508}
509
510// special
511// func TestUnrollInReverseHardcode(t *testing.T) {

Callers

nothing calls this directly

Calls 4

NextMethod · 0.95
NewIteratorFunction · 0.92
TotalSizeMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected