-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark vs MCL on x86 #47
Comments
Explanation on scalar multiplication slowness:
|
Actually, looking in the code, scalar mul uses nim-blscurve/blscurve/csources/64/big_384_58.c Lines 1040 to 1057 in e2ddcc4
nim-blscurve/blscurve/csources/64/ecp_BLS381.c Lines 1100 to 1110 in 1a18d0d
However there is a special path in nim-blscurve/blscurve/csources/64/pair_BLS381.c Lines 763 to 810 in 1a18d0d
and probably be used instead of the generic ecp_mul |
Updated MCL perf as of https://github.com/herumi/mcl/tree/b390d6d4ffded57727ff752fb0209e0d397ed946 (sept 21)
Pairing has been accelerated by 14% |
How to reproduce
MCL
nim-blscurve
Results
On i9-9980XE. Note: Overclocked at 4.1GHz while nominal clock is 3.0 GHz so the cycle count is off by a factor 4.1/3.0
Reading results:
sign
pairing
is composed among others of Miller Loop and Final Exponentiationpairing
isverify
MCL using JIT (x86-only)
Highlighted the important parts
MCL using Assembly from LLVM i256 and i384 (x86 and ARM)
Nim-blscurve using Milagro
Conclusion
(Our cycles and MCL clocks/clk are the same unit.)
Scalar Multiplication G2 / Signing is about 8x slower
Pairing / Verification is about 3x slower
The text was updated successfully, but these errors were encountered: