-
Notifications
You must be signed in to change notification settings - Fork 716
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
[Tests] Improve benchmark precision #2538
[Tests] Improve benchmark precision #2538
Conversation
Great backport.
splendid. Love the features that martinus added upstream ❤️ There is an issue with
gdb seems to suggest that
Initializing a const |
Might be the case of a dangling |
cmake build fails (when
Need to add if(NAT-PMP_FOUND)
target_link_libraries(bench_pivx PRIVATE ${NAT-PMP_LIBRARY})
target_include_directories(bench_pivx PRIVATE ${NAT-PMP_INCLUDE_DIR})
endif() to |
b7c3576
to
dbcaf86
Compare
done, added NAT-PMP link. Squashed in 70b1485. |
Even though the documentation says
with the current hardcoded
With the following changes: BENCHMARK(Base58Encode, 58 * 1000);
BENCHMARK(Base58CheckEncode, 43 * 1000);
BENCHMARK(Base58Decode, 136 * 1000);
BENCHMARK(BenchTimeDeprecated, 158000000);
BENCHMARK(BenchTimeMillis, 3460000);
BENCHMARK(BenchTimeMillisSys, 3460000);
BENCHMARK(BenchTimeMock, 59500000);
BENCHMARK(CCheckQueueSpeedPrevectorJob, 122);
BENCHMARK(CHACHA20_64BYTES, 5000000);
BENCHMARK(CHACHA20_256BYTES, 1250000);
BENCHMARK(CHACHA20_1MB, 338);
BENCHMARK(DeserializeBlockTest, 56500);
BENCHMARK(DeserializeAndCheckBlockTest, 4500);
BENCHMARK(FastRandom_1bit, 195 * 1000 * 1000);
BENCHMARK(FastRandom_32bit, 34 * 1000 * 1000);
BENCHMARK(LockedPool, 58);
PREVECTOR_TEST(Clear, 4042, 25300)
PREVECTOR_TEST(Destructor, 4058, 24400)
PREVECTOR_TEST(Resize, 4059, 25200)
BENCHMARK(RIPEMD160, 275);
BENCHMARK(SHA1, 305);
BENCHMARK(SHA256, 156);
BENCHMARK(SHA256_32b, 2300 * 1000);
BENCHMARK(SHA512, 240); I get total times closer to 1 sec:
It would be useful to see the results on different systems to compare. |
Running a single evaluation for each bench:
|
After the changes, same evaluations, i get the following results:
|
dbcaf86
to
79f8271
Compare
* inline performance critical code * Average runtime is specified and used to calculate iterations. * Console: show median of multiple runs * plot: show box plot * filter benchmarks * specify scaling factor * ignore src/test and src/bench in command line check script * number of iterations instead of time * Replaced runtime in BENCHMARK makro number of iterations. * Added -? to bench_bitcoin * Benchmark plotly.js URL, width, height can be customized * Fixed incorrect precision warning
This benchmark's runtime was rather unpredictive on different machines, not really a useful benchmark.
79f8271
to
a5fcdac
Compare
Yeah, we can leave the numbers as they are. We won't find values that sort-of-work with all possible machines/systems anyway. |
i rebased it right after sharing my results (3 days ago) and squashed the new benchmarks inside 17c4bcf ;). |
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 a5fcdac
Coming mainly from bitcoin#11517, which improves microbenchmarking with multiple features:
Plus added CMake support for the benchmarking framework as well.
-- Needed for a coming PR that i'm cooking that contains a new benchmark --