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

Function BenchmarkOnearrPremul

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

Source from the content-addressed store, hash-verified

315}
316
317func BenchmarkOnearrPremul(b *testing.B) {
318 if skipUseless {
319 b.Skip("skipping useless approach")
320 }
321 for api, testsize := range testSizes {
322 b.Run(testsize.Name, func(b *testing.B) {
323 verify := verifyIndex[api]
324 ap := testsize.AP
325 b.SetBytes(int64(ap.TotalSize()))
326 for i := 0; i < b.N; i++ {
327 it := onearrpremul.NewIterator(ap)
328 total := 0
329 for index, err := it.Next(); err == nil; index, err = it.Next() {
330 total += verify[index] * index
331 }
332 _ = total
333 }
334 })
335 }
336}
337
338func TestSpecialize(t *testing.T) {
339 testIterator(t, func(ap *shape.AP) Iterator { return specialize.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