(b *testing.B)
| 149 | } |
| 150 | |
| 151 | func BenchmarkOrdone(b *testing.B) { |
| 152 | if skipUseless { |
| 153 | b.Skip("skipping useless approach") |
| 154 | } |
| 155 | for api, testsize := range testSizes { |
| 156 | b.Run(testsize.Name, func(b *testing.B) { |
| 157 | verify := verifyIndex[api] |
| 158 | ap := testsize.AP |
| 159 | b.SetBytes(int64(ap.TotalSize())) |
| 160 | for i := 0; i < b.N; i++ { |
| 161 | it := ordone.NewIterator(ap) |
| 162 | total := 0 |
| 163 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 164 | total += verify[index] * index |
| 165 | } |
| 166 | _ = total |
| 167 | } |
| 168 | }) |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | func TestPremul(t *testing.T) { |
| 173 | if skipUseless { |
nothing calls this directly
no test coverage detected