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

Cut verification/signing/proofs etc. time by half for 64bit machines #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elichai
Copy link

@elichai elichai commented Apr 19, 2020

Hi,
This fork is quite an old fork of upstream, We've changed a lot since then.
https://github.com/rust-bitcoin/rust-secp256k1

This PR copies the build.rs from upstream (with some small changes for the zkp stuff and the fact that things aren't feature gated), the upside is proper detection of 64bit targets and passing the according preprocessor definitions

On my 64bit laptop, before this PR:

test benches::bench_sign                                ... bench:      77,019 ns/iter (+/- 2,576)
test benches::bench_verify                              ... bench:      85,931 ns/iter (+/- 1,940)
test benches::generate                                  ... bench:      41,897 ns/iter (+/- 863)
test ecdh::benches::bench_ecdh                          ... bench:      79,895 ns/iter (+/- 1,975)
test pedersen::benches::bench_bullet_proof_verification ... bench:   3,393,491 ns/iter (+/- 102,317)

After:

test benches::bench_sign                                ... bench:      42,202 ns/iter (+/- 3,486)
test benches::bench_verify                              ... bench:      44,289 ns/iter (+/- 1,587)
test benches::generate                                  ... bench:      23,601 ns/iter (+/- 626)
test ecdh::benches::bench_ecdh                          ... bench:      48,662 ns/iter (+/- 2,532)
test pedersen::benches::bench_bullet_proof_verification ... bench:   1,868,231 ns/iter (+/- 82,517)

I do suggest to merge/rebase this repository from/on upstream, or manually copy the changes you want because the library got a lot better.
These are just some examples of good/important changes we've made to the library:
rust-bitcoin/rust-secp256k1#146
rust-bitcoin/rust-secp256k1#125
rust-bitcoin/rust-secp256k1#120
rust-bitcoin/rust-secp256k1#115
rust-bitcoin/rust-secp256k1#100
rust-bitcoin/rust-secp256k1#87
rust-bitcoin/rust-secp256k1#78
rust-bitcoin/rust-secp256k1#64
rust-bitcoin/rust-secp256k1#51
rust-bitcoin/rust-secp256k1#27

@elichai elichai changed the title Cut verification/signing etc. time at half for 64bit machines Cut verification/signing/proofs etc. time at half for 64bit machines Apr 20, 2020
@elichai elichai changed the title Cut verification/signing/proofs etc. time at half for 64bit machines Cut verification/signing/proofs etc. time by half for 64bit machines Apr 20, 2020
quentinlesceller added a commit to quentinlesceller/rust-secp256k1 that referenced this pull request Mar 11, 2021
quentinlesceller added a commit to quentinlesceller/rust-secp256k1 that referenced this pull request Mar 31, 2021
quentinlesceller added a commit to mimblewimble/rust-secp256k1 that referenced this pull request Apr 8, 2021
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.

1 participant