(b *testing.B)
| 2872 | } |
| 2873 | |
| 2874 | func BenchmarkBigIntModInverse(b *testing.B) { |
| 2875 | p := new(BigInt).SetInt64(1) // Mersenne prime 2**1279 -1 |
| 2876 | p.Lsh(p, 1279) |
| 2877 | p.Sub(p, bigOne) |
| 2878 | x := new(BigInt).Sub(p, bigOne) |
| 2879 | z := new(BigInt) |
| 2880 | for i := 0; i < b.N; i++ { |
| 2881 | z.ModInverse(x, p) |
| 2882 | } |
| 2883 | } |
| 2884 | |
| 2885 | func BenchmarkBigIntSqrt(b *testing.B) { |
| 2886 | n, _ := new(BigInt).SetString("1"+strings.Repeat("0", 1001), 10) |
nothing calls this directly
no test coverage detected
searching dependent graphs…