Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: benchmark Protogalaxy rounds (#4316)
Splits folding into multiple functions for benchmarking. Parallelizes the loop in compute_full_honk_evaluations, which results in a 5x speedup in the perturbator round. Before optimization: ``` Benchmarking lock created at ~/BENCHMARK_IN_PROGRESS. protogalaxy_bench 100% 8050KB 37.1MB/s 00:00 2024-02-09T21:51:45+00:00 Running ./protogalaxy_bench Run on (16 X 3000 MHz CPU s) CPU Caches: L1 Data 32 KiB (x8) L1 Instruction 32 KiB (x8) L2 Unified 1024 KiB (x8) L3 Unified 36608 KiB (x1) Load Average: 0.00, 0.00, 0.00 ------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------ fold_one/14 311 ms 302 ms 2 fold_one/15 601 ms 582 ms 1 fold_one/16 1159 ms 1125 ms 1 fold_one/17 2317 ms 2248 ms 1 fold_one/18 4578 ms 4423 ms 1 fold_one/19 8997 ms 8694 ms 1 fold_one/20 17837 ms 17273 ms 1 ``` After optimization (comparison only with UltraHonk) and addition of new benchmarks: ``` Benchmarking lock created at ~/BENCHMARK_IN_PROGRESS. protogalaxy_bench 100% 8038KB 36.8MB/s 00:00 2024-02-09T21:54:16+00:00 Running ./protogalaxy_bench Run on (16 X 3000 MHz CPU s) CPU Caches: L1 Data 32 KiB (x8) L1 Instruction 32 KiB (x8) L2 Unified 1024 KiB (x8) L3 Unified 36608 KiB (x1) Load Average: 1.06, 1.10, 0.47 --------------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------------- fold_one<UltraComposer>/14 234 ms 223 ms 3 fold_one<UltraComposer>/15 438 ms 418 ms 2 fold_one<UltraComposer>/16 836 ms 800 ms 1 fold_one<UltraComposer>/17 1657 ms 1585 ms 1 fold_one<UltraComposer>/18 3316 ms 3131 ms 1 fold_one<UltraComposer>/19 6471 ms 6131 ms 1 fold_one<UltraComposer>/20 12638 ms 12022 ms 1 fold_one<GoblinUltraComposer>/14 633 ms 553 ms 1 fold_one<GoblinUltraComposer>/15 1175 ms 1069 ms 1 fold_one<GoblinUltraComposer>/16 2271 ms 2092 ms 1 fold_one<GoblinUltraComposer>/17 4794 ms 4218 ms 1 fold_one<GoblinUltraComposer>/18 9317 ms 8415 ms 1 fold_one<GoblinUltraComposer>/19 18220 ms 16743 ms 1 fold_one<GoblinUltraComposer>/20 38419 ms 34026 ms 1 ``` The round benchmarks: ``` Benchmarking lock created at ~/BENCHMARK_IN_PROGRESS. protogalaxy_round_bench 100% 8049KB 40.3MB/s 00:00 2024-02-12T21:51:43+00:00 Running ./protogalaxy_round_bench Run on (16 X 3000 MHz CPU s) CPU Caches: L1 Data 32 KiB (x8) L1 Instruction 32 KiB (x8) L2 Unified 1024 KiB (x8) L3 Unified 36608 KiB (x1) Load Average: 0.26, 1.03, 0.92 ----------------------------------------------------------------------------------------- Benchmark Time CPU Iterations ----------------------------------------------------------------------------------------- bench_round_goblin_ultra/preparation/14 345 ms 234 ms 3 bench_round_goblin_ultra/preparation/15 575 ms 446 ms 2 bench_round_goblin_ultra/preparation/16 1045 ms 861 ms 1 bench_round_goblin_ultra/preparation/17 2376 ms 1606 ms 1 bench_round_goblin_ultra/preparation/18 4161 ms 3160 ms 1 bench_round_goblin_ultra/preparation/19 7819 ms 6411 ms 1 bench_round_goblin_ultra/preparation/20 18265 ms 12433 ms 1 bench_round_goblin_ultra/perturbator/14 39.2 ms 39.0 ms 18 bench_round_goblin_ultra/perturbator/15 78.8 ms 78.3 ms 9 bench_round_goblin_ultra/perturbator/16 160 ms 159 ms 4 bench_round_goblin_ultra/perturbator/17 325 ms 324 ms 2 bench_round_goblin_ultra/perturbator/18 660 ms 657 ms 1 bench_round_goblin_ultra/perturbator/19 1327 ms 1319 ms 1 bench_round_goblin_ultra/perturbator/20 2680 ms 2659 ms 1 bench_round_goblin_ultra/combiner_quotient/14 189 ms 187 ms 4 bench_round_goblin_ultra/combiner_quotient/15 380 ms 372 ms 2 bench_round_goblin_ultra/combiner_quotient/16 748 ms 742 ms 1 bench_round_goblin_ultra/combiner_quotient/17 1509 ms 1488 ms 1 bench_round_goblin_ultra/combiner_quotient/18 3017 ms 2998 ms 1 bench_round_goblin_ultra/combiner_quotient/19 6024 ms 5978 ms 1 bench_round_goblin_ultra/combiner_quotient/20 12055 ms 11989 ms 1 bench_round_goblin_ultra/accumulator_update/14 89.0 ms 89.0 ms 8 bench_round_goblin_ultra/accumulator_update/15 169 ms 169 ms 4 bench_round_goblin_ultra/accumulator_update/16 327 ms 327 ms 2 bench_round_goblin_ultra/accumulator_update/17 686 ms 686 ms 1 bench_round_goblin_ultra/accumulator_update/18 1371 ms 1371 ms 1 bench_round_goblin_ultra/accumulator_update/19 3102 ms 3102 ms 1 bench_round_goblin_ultra/accumulator_update/20 6552 ms 6552 ms 1 ``` --------- Co-authored-by: lucasxia01 <[email protected]> Co-authored-by: ludamad <[email protected]>
- Loading branch information