(b *testing.B)
| 340 | } |
| 341 | |
| 342 | func BenchmarkSpecialize(b *testing.B) { |
| 343 | for api, testsize := range testSizes { |
| 344 | b.Run(testsize.Name, func(b *testing.B) { |
| 345 | verify := verifyIndex[api] |
| 346 | ap := testsize.AP |
| 347 | b.SetBytes(int64(ap.TotalSize())) |
| 348 | for i := 0; i < b.N; i++ { |
| 349 | it := specialize.NewIterator(ap) |
| 350 | total := 0 |
| 351 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 352 | total += verify[index] * index |
| 353 | } |
| 354 | _ = total |
| 355 | } |
| 356 | }) |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | func TestUnroll(t *testing.T) { |
| 361 | testIterator(t, func(ap *shape.AP) Iterator { return unroll.NewIterator(ap) }) |
nothing calls this directly
no test coverage detected