aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-08-29 14:53:55 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-08-29 14:53:55 +0800
commitd0740dde87e37f253ea4e16103567982d869ace8 (patch)
treed6043db5a603ebdf638228ea2e259c656a9c1d34
parentb7c2d17e99a2b95a8eb941ccdd03c559d56a830f (diff)
downloadtangerine-mcl-d0740dde87e37f253ea4e16103567982d869ace8.tar.gz
tangerine-mcl-d0740dde87e37f253ea4e16103567982d869ace8.tar.zst
tangerine-mcl-d0740dde87e37f253ea4e16103567982d869ace8.zip
ONLY_BENCH for bn384_test
-rw-r--r--test/bn384_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bn384_test.cpp b/test/bn384_test.cpp
index 84b3f19..3874938 100644
--- a/test/bn384_test.cpp
+++ b/test/bn384_test.cpp
@@ -38,6 +38,12 @@ void testCurve(const mcl::CurveParam& cp)
mapToG1(P, 1);
mapToG2(Q, 1);
GT e1, e2;
+#ifdef ONLY_BENCH
+ cybozu::CpuClock clk;
+ for (int i = 0; i < 10000; i++) { clk.begin(); pairing(e1, P, Q); clk.end(); }
+ clk.put();
+ return;
+#endif
pairing(e1, P, Q);
cybozu::XorShift rg;
mpz_class a, b;