diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-05-28 00:27:54 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-11 13:37:45 +0000 |
commit | 263431c486bcaddf442c912cf56171a778322316 (patch) | |
tree | b82e0ed856dd3307a076afea2b3e74a30cc0aea1 /tests/performance_tests/main.cpp | |
parent | multiexp: cut down on memory allocations (diff) | |
download | monero-263431c486bcaddf442c912cf56171a778322316.tar.xz |
Pippenger multiexp
Based on sarang's python code
Diffstat (limited to 'tests/performance_tests/main.cpp')
-rw-r--r-- | tests/performance_tests/main.cpp | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp index 912376595..c3e1bb4e0 100644 --- a/tests/performance_tests/main.cpp +++ b/tests/performance_tests/main.cpp @@ -222,26 +222,168 @@ int main(int argc, char** argv) TEST_PERFORMANCE1(filter, verbose, test_crypto_ops, op_addKeys3_2); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 2); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 4); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 8); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 16); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 32); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 64); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 128); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 256); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 512); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 1024); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 2048); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_bos_coster, 4096); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 2); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 4); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 8); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 16); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 32); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 64); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 128); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 256); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 512); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 1024); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 2048); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus, 4096); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 2); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 4); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 8); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 16); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 32); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 64); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 128); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 256); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 512); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 1024); + TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 2048); TEST_PERFORMANCE2(filter, verbose, test_multiexp, multiexp_straus_cached, 4096); +#if 1 + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 9); +#else + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 8, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 16, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 32, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 64, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 128, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 256, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 512, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 1024, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 2048, 9); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 1); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 2); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 3); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 4); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 5); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 6); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 7); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 8); + TEST_PERFORMANCE3(filter, verbose, test_multiexp, multiexp_pippenger, 4096, 9); +#endif + std::cout << "Tests finished. Elapsed time: " << timer.elapsed_ms() / 1000 << " sec" << std::endl; return 0; |