mirror of
https://github.com/wownero/wownero.git
synced 2026-12-01 21:53:54 +01:00
Changes complexity from M*N to (2*N+M)*log2(M). The FCMP++ stressnet recently hit mempool sizes of ~55k txs. If the requesting node's mempool is populated, this results in an average of (55000*55000)/2 (about 1.5 billion) comparisons for the responding node. Under this commit, this would be reduced to (55000+55000)*log2(55000) comparisons (about 2.6 million), a 99.83% reduction. (cherry picked from commit 0761024b349048ebf79dbfe71caab11826833464)