Block decoder incremental vs. non-incremental benchmark#5367
Open
crocodile-dentist wants to merge 7 commits into
Open
Block decoder incremental vs. non-incremental benchmark#5367crocodile-dentist wants to merge 7 commits into
crocodile-dentist wants to merge 7 commits into
Conversation
de5f8bb to
2402dbd
Compare
c6b678a to
58fd203
Compare
coot
approved these changes
May 20, 2026
coot
left a comment
Contributor
There was a problem hiding this comment.
Nice, just two minor comments.
7cba636 to
6af6b2c
Compare
27271bb to
b95528c
Compare
b95528c to
8be7bbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a benchmark for comparing incremental and non-incremental CBOR block decoder performance. One mechanism of how to reduce block processing time is to decode it while it is streamed across the network, in between SDU arrival times. Tests on one machine indicate that for roughly full Praos blocks a few milliseconds may be saved, with more material savings for future larger blocks, esp. for Leios.
resolves #5280
Actual performance in a real system may vary, but in a benchmark setting the results for incrementally decoding a full Praos block are minor, on the order of several ms. More impressive gains materialize for much larger blocks, ie. several MB in size, where time saved appears to be on the order of several hundred ms.
Checklist
Quality
Maintenance
ouroboros-networkproject.