|
|
|
@ -687,6 +687,11 @@ int main(int argc, char *argv[]) |
|
|
|
|
} |
|
|
|
|
FpDbl dx; |
|
|
|
|
FpDbl::mulPre(dx, xv[0], yv[0]); |
|
|
|
|
Fp2 x2, y2; |
|
|
|
|
x2.a.setByCSPRNG(rg); |
|
|
|
|
x2.b.setByCSPRNG(rg); |
|
|
|
|
y2.a.setByCSPRNG(rg); |
|
|
|
|
y2.b.setByCSPRNG(rg); |
|
|
|
|
if(0){ |
|
|
|
|
puts("----------"); |
|
|
|
|
xv[0].dump(); |
|
|
|
@ -695,12 +700,13 @@ if(0){ |
|
|
|
|
puts("----------"); |
|
|
|
|
// exit(1);
|
|
|
|
|
} |
|
|
|
|
// CYBOZU_BENCH_C("subDbl", 10000000, FpDbl::sub, dx, dx, dx);
|
|
|
|
|
CYBOZU_BENCH_C("Fp2::add", 10000000, Fp2::add, x2, x2, y2); |
|
|
|
|
CYBOZU_BENCH_C("Fp2::sub", 10000000, Fp2::sub, x2, x2, y2); |
|
|
|
|
// CYBOZU_BENCH_C("mulPre", 100000000, FpDbl::mulPre, dx, xv[0], yv[0]);
|
|
|
|
|
// CYBOZU_BENCH_C("sqrPre", 100000000, FpDbl::sqrPre, dx, xv[0]);
|
|
|
|
|
// CYBOZU_BENCH_C("mod ", 100000000, FpDbl::mod, xv[0], dx);
|
|
|
|
|
CYBOZU_BENCH_C("mul ", 100000000, Fp::mul, xv[0], yv[0], xv[0]); |
|
|
|
|
CYBOZU_BENCH_C("sqr ", 100000000, Fp::sqr, xv[0], xv[0]); |
|
|
|
|
// CYBOZU_BENCH_C("mul ", 100000000, Fp::mul, xv[0], yv[0], xv[0]);
|
|
|
|
|
// CYBOZU_BENCH_C("sqr ", 100000000, Fp::sqr, xv[0], xv[0]);
|
|
|
|
|
return 0; |
|
|
|
|
#endif |
|
|
|
|
return cybozu::test::autoRun.run(argc, argv); |
|
|
|
|