(b *testing.B, aSize, bSize int)
| 2899 | } |
| 2900 | |
| 2901 | func benchmarkBigIntDiv(b *testing.B, aSize, bSize int) { |
| 2902 | var r = rand.New(rand.NewSource(1234)) |
| 2903 | aa := randBigInt(r, uint(aSize)) |
| 2904 | bb := randBigInt(r, uint(bSize)) |
| 2905 | if aa.Cmp(bb) < 0 { |
| 2906 | aa, bb = bb, aa |
| 2907 | } |
| 2908 | x := new(BigInt) |
| 2909 | y := new(BigInt) |
| 2910 | |
| 2911 | b.ResetTimer() |
| 2912 | for i := 0; i < b.N; i++ { |
| 2913 | x.DivMod(aa, bb, y) |
| 2914 | } |
| 2915 | } |
| 2916 | |
| 2917 | func BenchmarkBigIntDiv(b *testing.B) { |
| 2918 | sizes := []int{ |
no test coverage detected
searching dependent graphs…