Skip to content
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

More benches #8

Merged
merged 6 commits into from
Mar 18, 2021
Merged

More benches #8

merged 6 commits into from
Mar 18, 2021

Conversation

fanatid
Copy link
Owner

@fanatid fanatid commented Mar 18, 2021

Added benches to paulmillr/noble-secp256k1. Only pointFromScalar / sign.

====================================================================================================
Benchmarking function: pointFromScalar
----------------------------------------------------------------------------------------------------
tiny-secp256k1 (rust addon): 41.65 us/op (24011.22 op/s), ±11.57 %
tiny-secp256k1 (wasm): 277.12 us/op (3608.57 op/s), ±3.08 %
tiny-secp256k1@1.1.6 (C++ addon, NAN/V8): 30.06 us/op (33265.69 op/s), ±3.67 %
tiny-secp256k1@1.1.6 (elliptic): 504.15 us/op (1983.52 op/s), ±3.42 %
secp256k1@4.0.2 (C++ addon, N-API): 31.23 us/op (32022.68 op/s), ±4.23 %
secp256k1@4.0.2 (elliptic): 503.60 us/op (1985.69 op/s), ±3.61 %
noble-secp256k1@1.1.2 (BigInt): 368.69 us/op (2712.29 op/s), ±3.97 %
----------------------------------------------------------------------------------------------------
Fastest: tiny-secp256k1@1.1.6 (C++ addon, NAN/V8)
====================================================================================================
Benchmarking function: sign
----------------------------------------------------------------------------------------------------
tiny-secp256k1 (rust addon): 61.30 us/op (16313.73 op/s), ±3.15 %
tiny-secp256k1 (wasm): 463.98 us/op (2155.26 op/s), ±0.13 %
tiny-secp256k1@1.1.6 (C++ addon, NAN/V8): 49.29 us/op (20286.89 op/s), ±2.50 %
tiny-secp256k1@1.1.6 (elliptic): 857.85 us/op (1165.71 op/s), ±1.47 %
secp256k1@4.0.2 (C++ addon, N-API): 51.12 us/op (19560.30 op/s), ±2.78 %
secp256k1@4.0.2 (elliptic): 889.37 us/op (1124.40 op/s), ±0.30 %
noble-secp256k1@1.1.2 (BigInt): 562.15 us/op (1778.88 op/s), ±0.58 %
----------------------------------------------------------------------------------------------------
Fastest: tiny-secp256k1@1.1.6 (C++ addon, NAN/V8)
====================================================================================================

@paulmillr maybe this result will be interesting for you. My CPU: i5-8250U.
If verify will be able to accept raw signature (64 bytes r|s) I would able to add it to benchmark too.

@fanatid fanatid merged commit b9a7b6d into to-rust-update Mar 18, 2021
@fanatid fanatid deleted the more-benches branch March 18, 2021 16:45
@paulmillr
Copy link

@fanatid thanks. verify already accepts raw hex strings.

@paulmillr
Copy link

@fanatid thanks for the great test vectors also!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants