-
Couldn't load subscription status.
- Fork 1.1k
build: detect arm32 assembly by default #1752
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
base: master
Are you sure you want to change the base?
Conversation
5de771e to
2b65c2d
Compare
Please provide benchmarks to support this statement. |
d987270 to
7a613ce
Compare
will do. I'm buying a raspberry PI right now. I reckon if the benchmarks don't show improvements we should delete |
|
Perhaps convert this to a draft while the CI is red? |
I've ran benchmarks on my raspberry pi 4. Here are the results.
Benchmark , Min(us) , Avg(us) , Max(us)
ecdsa_verify , 378.0 , 379.0 , 379.0
ecdsa_sign , 184.0 , 184.0 , 185.0
ec_keygen , 160.0 , 160.0 , 160.0
ecdh , 382.0 , 382.0 , 383.0
schnorrsig_sign , 162.0 , 162.0 , 162.0
schnorrsig_verify , 380.0 , 380.0 , 381.0
ellswift_encode , 109.0 , 109.0 , 109.0
ellswift_decode , 60.1 , 60.2 , 60.3
ellswift_keygen , 268.0 , 268.0 , 268.0
ellswift_ecdh , 395.0 , 395.0 , 395.0
Benchmark , Min(us) , Avg(us) , Max(us)
ecdsa_verify , 322.0 , 322.0 , 322.0
ecdsa_sign , 170.0 , 170.0 , 170.0
ec_keygen , 145.0 , 145.0 , 145.0
ecdh , 332.0 , 332.0 , 333.0
schnorrsig_sign , 148.0 , 148.0 , 149.0
schnorrsig_verify , 323.0 , 323.0 , 324.0
ellswift_encode , 94.9 , 95.1 , 95.3
ellswift_decode , 50.6 , 50.8 , 50.9
ellswift_keygen , 239.0 , 240.0 , 240.0
ellswift_ecdh , 343.0 , 343.0 , 343.0 |
Which compiler did you use? |
I used the option C compiler ............................ GNU 13.3.0, /usr/bin/arm-linux-gnueabihf-gcc |
This workflow is for cross-compiling. Did you try to build natively on your RPi? |
6951bcf to
557bad2
Compare
I get: /home/pi/secp256k1/src/asm/field_10x26_arm.s:875: Error: selected processor does not support `ubfx r2,r3,#0,#22' in ARM mode
/home/pi/secp256k1/src/asm/field_10x26_arm.s:880: Error: selected processor does not support `movw r14,field_R1<<4' in ARM modewhen building natively on my RPI. the compiler is and our |
This PR addresses issue #1751 by adding a call to
check_arm32_assembly()by default, matching the current behavior withcheck_x86_64_assembly().This would result in speedup on
field_10x26_impl.hon default builds. For example, currently, the Bitcoin Core reference implementation compiles libsecp256k1 with default options, leading to unoptimal builds.This change could help address bitcoin/bitcoin#32832 partially, considering the flamegraph shows that
ecdsa_verifytakes 90% of IBD time.