Skip to content

Conversation

@jeffro256
Copy link
Contributor

@jeffro256 jeffro256 commented Nov 3, 2025

Changes complexity from $M * N$ to $(2 * N+M) * log2(M)$, where $M$ is the requester's mempool size and $N$ is the responder's mempool size. 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 $(2 * 55000+55000)*log2(55000)$ comparisons (about 2.6 million), a 99.83% reduction.

This commit is especially noteworthy for FCMP++ stressnet node performance when considering seraphis-migration#177 is merged into the stressnet branch. The cited change makes the pool complement p2p call much more frequently.

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.
@jeffro256 jeffro256 force-pushed the txpool_complement_iter branch from fa4179f to 6344965 Compare November 4, 2025 06:21
@jeffro256
Copy link
Contributor Author

Refactored to remove Boost usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants