-
Notifications
You must be signed in to change notification settings - Fork 1.1k
doc/bench: added help text for SECP256K1_BENCH_ITERS env var for bench_ecmult #1793
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
doc/bench: added help text for SECP256K1_BENCH_ITERS env var for bench_ecmult #1793
Conversation
I don't see why this is. Can you explain? If that's the case, we could just check this condition and bail out (instead of documenting it). |
Yea if you take a look at this block of code if iters is less than 3 we don't run
We already bail out in this block, I was just suggesting if we add documentation in the help text for |
|
Oh yes, I missed that |
3eabc77 to
8f331c9
Compare
Sounds good I updated it in 8f331c9 |
|
This might be good for a follow-up but I noticed that if we put any value for SECP256K1_BENCH_ITERS not greater than 0 It will print A simple check would fix that Example |
…h_ecmult In addition a print message saying some tests were skipped was added
8f331c9 to
bd5ced1
Compare
real-or-random
left a comment
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.
utACK bd5ced1
Indeed, I had noticed the same when testing this earlier. Happy to see a fix for this. |
hebasto
left a comment
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.
ACK bd5ced1, I have reviewed the code and it looks OK. Tested on Ubuntu 25.10.
While aligning implementation across all benchmarks, argv could be passed to the help() in bench.c and bench_internal.c.
@real-or-random
A side question. What does 77 refer to in:
Line 375 in 2d9137c
| /* This is disabled with low count of iterations because the loop runs 77 times even with iters=1 |
I see it was added in this PR #722. It might have been added so Travis CI doesn't run this benchmark so many times, thus slowing down the CI. |
I can work on this and open in a separate refactor/bench PR to keep the scope of this one minimal. |
jonasnick
left a comment
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.
ACK bd5ced1
Description
I noticed that in both
benchandbench_internalthere was a help text mentioning to the users that you could useSECP256K1_BENCH_ITERSto customize the amount of iterations for each benchmark, butbench_ecmultdid not have this text so I added it in.There is a caveat that if
SECP256K1_BENCH_ITERSis less than 3, thenrun_ecmult_multi_benchwill not run. Should I add that to the help text?Before
After