(b *testing.B)
| 362 | } |
| 363 | |
| 364 | func BenchmarkUnroll(b *testing.B) { |
| 365 | for api, testsize := range testSizes { |
| 366 | b.Run(testsize.Name, func(b *testing.B) { |
| 367 | verify := verifyIndex[api] |
| 368 | ap := testsize.AP |
| 369 | b.SetBytes(int64(ap.TotalSize())) |
| 370 | for i := 0; i < b.N; i++ { |
| 371 | it := unroll.NewIterator(ap) |
| 372 | total := 0 |
| 373 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 374 | total += verify[index] * index |
| 375 | } |
| 376 | _ = total |
| 377 | } |
| 378 | }) |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | func TestUnrollReverse(t *testing.T) { |
| 383 | testIterator(t, func(ap *shape.AP) Iterator { return unrollreverse.NewIterator(ap) }) |
nothing calls this directly
no test coverage detected