Skip to content

Block decoder incremental vs. non-incremental benchmark#5367

Open
crocodile-dentist wants to merge 7 commits into
mainfrom
mw/incremental-benchmark
Open

Block decoder incremental vs. non-incremental benchmark#5367
crocodile-dentist wants to merge 7 commits into
mainfrom
mw/incremental-benchmark

Conversation

@crocodile-dentist

@crocodile-dentist crocodile-dentist commented May 13, 2026

Copy link
Copy Markdown
Contributor

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

  • Commit sequence makes sense and have useful messages, see ref.
  • New tests are added and existing tests are updated.
  • Self-reviewed the PR.

Maintenance

  • Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • Added labels.
  • Updated changelog files.
  • The documentation has been properly updated, see ref.

@crocodile-dentist crocodile-dentist self-assigned this May 13, 2026
@crocodile-dentist crocodile-dentist requested a review from a team as a code owner May 13, 2026 09:55
@github-project-automation github-project-automation Bot moved this to In Progress in Ouroboros Network May 13, 2026
@crocodile-dentist crocodile-dentist force-pushed the mw/incremental-benchmark branch from de5f8bb to 2402dbd Compare May 13, 2026 10:13
@crocodile-dentist crocodile-dentist requested a review from a team as a code owner May 13, 2026 11:13
@crocodile-dentist crocodile-dentist force-pushed the mw/incremental-benchmark branch 19 times, most recently from c6b678a to 58fd203 Compare May 19, 2026 07:45

@coot coot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, just two minor comments.

Comment thread incremental-benchmark/src/Main.hs Outdated
Comment thread incremental-benchmark/src/Main.hs Outdated
Comment thread incremental-benchmark/src/Main.hs Outdated
@coot coot added the leios Issues / PRs related to Leios label May 20, 2026
@crocodile-dentist crocodile-dentist force-pushed the mw/incremental-benchmark branch from 7cba636 to 6af6b2c Compare May 21, 2026 08:12
@crocodile-dentist crocodile-dentist changed the title Incremental benchmark. Block decoder incremental vs. non-incremental benchmark May 21, 2026
@crocodile-dentist crocodile-dentist force-pushed the mw/incremental-benchmark branch 2 times, most recently from 27271bb to b95528c Compare May 25, 2026 12:22
@crocodile-dentist crocodile-dentist force-pushed the mw/incremental-benchmark branch from b95528c to 8be7bbd Compare May 25, 2026 12:56
@coot coot moved this from In Progress to In Review in Ouroboros Network May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

leios Issues / PRs related to Leios

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Incremental decoding experiment

2 participants