-
Notifications
You must be signed in to change notification settings - Fork 18
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
drop asserts from benchmarks #343
Conversation
Also ensure nothing is optimised out
Pull Request Test Coverage Report for Build 3981397350
💛 - Coveralls |
|
||
bytes r(signature.begin(), signature.begin() + 32); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since asserts
are stripped in --release
it's generally good we don't use them in benchmarks. So, from all the changes, I assume only this one -- moving r, s before the loop -- could be important? It doesn't seem to change much on my machine, though:
--------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------
--- franziskus/fixup-some-benchmarks, but with r,s before loop
P256_SHA256_ECDSA_Sign 328377 ns 328279 ns 2130
P256_SHA256_ECDSA_Verify 734751 ns 734636 ns 947
P256_ECDH 320494 ns 320433 ns 2184
Openssl_P256_ECDSA_Sign 20389 ns 20383 ns 34030
Openssl_P256_ECDSA_Verify 54693 ns 54673 ns 12692
Openssl_P256_ECDH 38962 ns 38950 ns 17927
--- franziskus/fixup-some-benchmarks
P256_SHA256_ECDSA_Sign 325494 ns 325416 ns 2150
P256_SHA256_ECDSA_Verify 730341 ns 730129 ns 952
P256_ECDH 318984 ns 318906 ns 2192
Openssl_P256_ECDSA_Sign 20162 ns 20154 ns 34424
Openssl_P256_ECDSA_Verify 54081 ns 54060 ns 12041
Openssl_P256_ECDH 38737 ns 38727 ns 18051
Do you see a difference on your machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any changes in performance from this change either. It's dominated by the math.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I left a question below, but in any case this is good to go!
Also ensure nothing is optimised out (fixes weird p256 performance numbers).