Skip to content

Improve CLI timing measurements - #148

Merged
zkfriendly merged 6 commits into
mainfrom
f/better-bench
Nov 11, 2026
Merged

zkfriendly merged 6 commits into
mainfrom
f/better-bench

Conversation

@frozenspider

@frozenspider frozenspider commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Improved measurements reported when running cargo run --release -p bitz-cli.
This PR involves no changes in behaviour.

Added explicit measurement steps

  • Setup steps:
    • Synthesize constraints
    • Prepare integer matrices
    • Build virtual map
  • Bind circuit statement
  • Sample prime
  • Project constraint matrices onto random field
  • Reduce witness modulo prime
  • Bind virtual map digest
  • Transpose claim
  • Bind PCS opening statement
  • Free witness (this may take non-negligible time due to witness storing Box<[u64]>)

Together they now add up to (almost!) 100% of setup/prove/verify.

"Prove/verify PCS opening" no longer recursively reports own time.

Was:

├─╮ pcs::opening::Prove PCS opening
│ ├─╮ post_gkr::Prove inner-product sumcheck
│ ├─╯ Prove inner-product sumcheck: 4.76ms duration
│ ├─╮ pcs::opening::Prove PCS opening
│ │ ├─╮ pcs::opening::Ring switch
│ │ ├─╯ Ring switch: 565.00µs duration
│ │ ├─╮ pcs::ligerito::Prove Ligerito
│ │ ├─╯ Prove Ligerito: 1.50ms duration
│ ├─╯ Prove PCS opening: 2.10ms duration
├─╯ Prove PCS opening: 13.09ms duration

Now (with added steps):

├─╮ pcs::Prove PCS opening
│ ├─╮ pcs::opening::Bind opening statement
│ ├─╯ Bind opening statement: 7.90ms duration
│ ├─╮ post_gkr::Prove inner-product sumcheck
│ ├─╯ Prove inner-product sumcheck: 5.32ms duration
│ ├─╮ pcs::opening::Ring switch
│ ├─╯ Ring switch: 1.57ms duration
│ ├─╮ pcs::ligerito::Prove Ligerito
│ ├─╯ Prove Ligerito: 1.29ms duration
├─╯ Prove PCS opening: 16.42ms duration

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@frozenspider
frozenspider marked this pull request as ready for review November 11, 2026 10:19
@frozenspider
frozenspider added this pull request to stack #150 November 11, 2026 10:21

@zkfriendly zkfriendly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@zkfriendly
zkfriendly merged commit ba9c6dc into main Nov 11, 2026
3 checks passed
@zkfriendly
zkfriendly deleted the f/better-bench branch November 11, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants