More bench: sha256(32 bytes) and longer pairing bench (#108)

This commit is contained in:
Mamy Ratsimbazafy 2021-03-08 11:19:24 +01:00 committed by GitHub
parent 7e8de1e748
commit be2be6711d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -25,12 +25,17 @@ proc benchSHA256_blst[T](msg: openarray[T], msgComment: string, iters: int) =
when isMainModule:
proc main() =
block:
let msg5MB = newSeqWith(5_000_000, byte rng.rand(255))
benchSHA256_nimcrypto(msg5MB, "5MB", 16)
benchSHA256_blst(msg5MB, "5MB", 16)
let msg32B = newSeqWith(32, byte rng.rand(255))
benchSHA256_nimcrypto(msg32B, "32B", 32)
benchSHA256_blst(msg32B, "32B", 32)
block:
let msg128B = newSeqWith(128, byte rng.rand(255))
benchSHA256_nimcrypto(msg128B, "128B", 128)
benchSHA256_blst(msg128B, "128B", 128)
block:
let msg5MB = newSeqWith(5_000_000, byte rng.rand(255))
benchSHA256_nimcrypto(msg5MB, "5MB", 16)
benchSHA256_blst(msg5MB, "5MB", 16)
main()

View File

@ -231,7 +231,7 @@ when isMainModule:
benchEcAddG2(1000)
when BLS_BACKEND == BLST:
benchBLSTPairing(1000)
benchBLSTPairing(5000)
else:
benchMiraclPairingViaDoublePairing(1000)
benchMiraclPairingViaMultiPairing(1000)