From 19b3493db25ddbdff553fb42f52ba8692aca5cd1 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Fri, 25 Oct 2019 16:51:39 +0900 Subject: [PATCH] [eth2] add benchmark of mapToG2 --- test/bls12_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/bls12_test.cpp b/test/bls12_test.cpp index 359a1ce..caa9cc0 100644 --- a/test/bls12_test.cpp +++ b/test/bls12_test.cpp @@ -729,6 +729,10 @@ CYBOZU_TEST_AUTO(eth2) G2 sig = Q * sec; const char *expectSig = "b9d1bf921b3dd048bdce38c2ceac2a2a8093c864881f2415f22b198de935ffa791707855c1656dc21a7af2d502bb46590151d645f062634c3b2cb79c4ed1c4a4b8b3f19f0f5c76965c651553e83d153ff95353735156eff77692f7a62ae653fb"; CYBOZU_TEST_EQUAL(sig.getStr(mcl::IoSerializeHexStr), expectSig); + + CYBOZU_BENCH_C("mapToG2 org-cofactor", 1000, mapToG2, Q, m); + setOriginalG2cofactor(false); + CYBOZU_BENCH_C("mapToG2 org-cofactor", 1000, mapToG2, Q, m); } typedef std::vector FpVec;