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

Function BenchmarkOnearrRevSpecialize

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

Source from the content-addressed store, hash-verified

268}
269
270func BenchmarkOnearrRevSpecialize(b *testing.B) {
271 for api, testsize := range testSizes {
272 b.Run(testsize.Name, func(b *testing.B) {
273 verify := verifyIndex[api]
274 ap := testsize.AP
275 b.SetBytes(int64(ap.TotalSize()))
276 for i := 0; i < b.N; i++ {
277 it := onearrrevspecialize.NewIterator(ap)
278 total := 0
279 for index, err := it.Next(); err == nil; index, err = it.Next() {
280 total += verify[index] * index
281 }
282 _ = total
283 }
284 })
285 }
286}
287
288func TestOnearrRevSpecializeAdvance(t *testing.T) {
289 testIterator(t, func(ap *shape.AP) Iterator { return onearrrevspecializeadvance.NewIterator(ap) })

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