Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
add miller loop and final exp benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
kilic committed Jan 16, 2021
1 parent 5fd2c1d commit 7616a77
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pairing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,25 @@ func BenchmarkPairing(t *testing.B) {
}
_ = e
}

func BenchmarkMillerLoop(t *testing.B) {
bls := NewEngine()
g1, g2, gt := bls.G1, bls.G2, bls.GT()
bls.AddPair(g1.One(), g2.One())
f := gt.New().one()
t.ResetTimer()
for i := 0; i < t.N; i++ {
bls.millerLoop(f)
}
}

func BenchmarkFinalExp(t *testing.B) {
bls := NewEngine()
g1, g2, gt := bls.G1, bls.G2, bls.GT()
bls.AddPair(g1.One(), g2.One())
f := gt.New().one()
t.ResetTimer()
for i := 0; i < t.N; i++ {
bls.finalExp(f)
}
}

0 comments on commit 7616a77

Please sign in to comment.