HorizenOfficial / zend_oo

This repository is archived, Zendoo is out of beta and has been included in https://github.com/HorizenOfficial/zen.
https://github.com/HorizenOfficial/zen
Other
34 stars 22 forks source link

Speedup SelectCoins with remove/erase idioms #55

Closed abi87 closed 3 years ago

abi87 commented 4 years ago

Scanning a vector and removing specific items one by one can cause relocation and results in a O(N^2) complexity. Erase/Remove idiom guarantees linear complexity instead since all elements marked for removal are erased at once

abi87 commented 3 years ago

Absorbed by https://github.com/HorizenOfficial/zend_oo/pull/74