(b *testing.B)
| 315 | } |
| 316 | |
| 317 | func 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 | |
| 338 | func TestSpecialize(t *testing.T) { |
| 339 | testIterator(t, func(ap *shape.AP) Iterator { return specialize.NewIterator(ap) }) |
nothing calls this directly
no test coverage detected