special func TestUnrollInReverseHardcode(t *testing.T) { testIterator(t, unrollinreversehardcode.NewIterator(shape.New(100, 100, 100, 100))) }
(b *testing.B)
| 513 | // } |
| 514 | |
| 515 | func BenchmarkUnrollInReverseHardcode(b *testing.B) { |
| 516 | b.Run("100x100x100x100", func(b *testing.B) { |
| 517 | verify := verifyIndex[indexOf100x] |
| 518 | ap := shape.New(100, 100, 100, 100) |
| 519 | b.SetBytes(int64(ap.TotalSize())) |
| 520 | for i := 0; i < b.N; i++ { |
| 521 | it := unrollinreversehardcode.NewIterator(ap) |
| 522 | total := 0 |
| 523 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 524 | total += verify[index] * index |
| 525 | } |
| 526 | _ = total |
| 527 | } |
| 528 | }) |
| 529 | } |
nothing calls this directly
no test coverage detected