Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 28, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

By reserving the memory in advance we halve the encoding speed which
ultimately speeds up the statement.hash() function which gets called in
a lot of places.

More importantly, when we start being connected to more nodes the hash
function gets called a lot for the same statement because we might
receive the same statement from all peers we are connected to.

For example on versi on_statements ate a lot of time when running with
15 nodes, see
#10814 (comment).

Modified the statement_network benchmark to also be parameterizable by
the number of times we might receive a statement and if we receive it
from 16 peers, we notice a speed up with this PR of ~16%, which I
consider not negligible, so I consider this an worthy improvement.
```
on_statements/statements_2000/peers_16/threads_8/blocking
                        time:   [22.099 ms 22.641 ms 23.175 ms]
                        change: [-18.841% -16.637% -14.429%] (p = 0.00 < 0.05)
```

---------

Signed-off-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Andrei Eres <[email protected]>
@pull pull bot locked and limited conversation to collaborators Jan 28, 2026
@pull pull bot added the ⤵️ pull label Jan 28, 2026
@pull pull bot merged commit 21df44e into cshein45:master Jan 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant