Open 0xmountaintop opened 4 years ago
is this PR ready to be merged?
is this PR ready to be merged?
@omershlo Yes I think so!
Would you mind taking a look again?
BTW, h_g_inner now converts between bytes and Integer just for better demostrating the logic. This is indeed tedious and unnecessay. We can actually run hashing and concat only using bytes, and convert it to Integer at the end.
I will refactor it in this way once we decide which hash_and_concat way (we mentioned 3 ways above) we want to use.
let me know when ready to merge
updated bechmark results:
$ cargo fmt && cargo bench --bench bench-vdf-rsa --jobs 1
Finished bench [optimized] target(s) in 0.07s
Running target/release/deps/bench_vdf_rsa-6a178b6bb8445182
Gnuplot not found, using plotters backend
eval with difficulty 1000
time: [7.5328 ms 7.5852 ms 7.6428 ms]
change: [+2.8713% +3.8219% +4.7723%] (p = 0.00 < 0.05)
Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
2 (2.00%) high mild
2 (2.00%) high severe
verify with difficulty 1000
time: [944.50 us 948.74 us 953.69 us]
change: [-14.040% -10.687% -7.5197%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) high mild
3 (3.00%) high severe
eval with difficulty 2000
time: [13.640 ms 13.719 ms 13.801 ms]
change: [-14.981% -11.285% -7.6220%] (p = 0.00 < 0.05)
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
4 (4.00%) high mild
Benchmarking verify with difficulty 2000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 7.0s, enable flat sampling, or reduce sample count to 50.
verify with difficulty 2000
time: [1.3749 ms 1.3810 ms 1.3894 ms]
change: [+12.347% +13.774% +15.231%] (p = 0.00 < 0.05)
Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
5 (5.00%) high mild
5 (5.00%) high severe
eval with difficulty 5000
time: [34.430 ms 34.672 ms 34.962 ms]
change: [-3.8130% -2.1946% -0.5532%] (p = 0.01 < 0.05)
Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
5 (5.00%) high mild
4 (4.00%) high severe
Benchmarking verify with difficulty 5000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.6s, enable flat sampling, or reduce sample count to 60.
verify with difficulty 5000
time: [1.3095 ms 1.3201 ms 1.3346 ms]
change: [+20.283% +21.947% +23.644%] (p = 0.00 < 0.05)
Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
6 (6.00%) high mild
2 (2.00%) high severe
Benchmarking eval with difficulty 10000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.9s, or reduce sample count to 70.
eval with difficulty 10000
time: [65.710 ms 65.900 ms 66.130 ms]
change: [-4.7590% -3.6740% -2.6779%] (p = 0.00 < 0.05)
Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
4 (4.00%) high mild
8 (8.00%) high severe
Benchmarking verify with difficulty 10000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.1s, enable flat sampling, or reduce sample count to 70.
verify with difficulty 10000
time: [1.0345 ms 1.0411 ms 1.0493 ms]
change: [-99.746% -99.742% -99.739%] (p = 0.00 < 0.05)
Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
5 (5.00%) high mild
1 (1.00%) high severe
Benchmarking eval with difficulty 100000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 69.8s, or reduce sample count to 10.
eval with difficulty 100000
time: [670.80 ms 674.53 ms 678.68 ms]
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
Benchmarking verify with difficulty 100000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.3s, enable flat sampling, or reduce sample count to 60.
verify with difficulty 100000
time: [1.2220 ms 1.2251 ms 1.2302 ms]
Found 21 outliers among 100 measurements (21.00%)
2 (2.00%) high mild
19 (19.00%) high severe
Benchmarking eval with difficulty 1000000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 685.1s, or reduce sample count to 10.
eval with difficulty 1000000
time: [6.6123 s 6.6311 s 6.6512 s]
Found 22 outliers among 100 measurements (22.00%)
17 (17.00%) high mild
5 (5.00%) high severe
verify with difficulty 1000000
time: [913.82 us 919.67 us 925.02 us]
Found 11 outliers among 100 measurements (11.00%)
3 (3.00%) high mild
8 (8.00%) high severe
This PR adds an exmaple of benchmarking VDF in rsa_group (using RSA-2048 modulus).
environment
how to test it
test result