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 /src/ringct/bulletproofs.cc | |
parent | multiexp: cut down on memory allocations (diff) | |
download | monero-263431c486bcaddf442c912cf56171a778322316.tar.xz |
Pippenger multiexp
Based on sarang's python code
Diffstat (limited to 'src/ringct/bulletproofs.cc')
-rw-r--r-- | src/ringct/bulletproofs.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ringct/bulletproofs.cc b/src/ringct/bulletproofs.cc index 884c99537..83005eaa4 100644 --- a/src/ringct/bulletproofs.cc +++ b/src/ringct/bulletproofs.cc @@ -72,10 +72,10 @@ static boost::mutex init_mutex; static inline rct::key multiexp(const std::vector<MultiexpData> &data, bool HiGi) { static const size_t STEP = getenv("STRAUS_STEP") ? atoi(getenv("STRAUS_STEP")) : 0; - if (HiGi || data.size() < 1000) - return straus(data, HiGi ? HiGi_cache: NULL, STEP); + if (HiGi) + return data.size() <= 256 ? straus(data, HiGi_cache, STEP) : pippenger(data, get_pippenger_c(data.size())); else - return bos_coster_heap_conv_robust(data); + return data.size() <= 64 ? straus(data, NULL, STEP) : pippenger(data, get_pippenger_c(data.size())); } //addKeys3acc_p3 |