Skip to content

Use sparse CPU KZG openings at every occupancy - #240

Merged
BernardLowe merged 1 commit into
mainfrom
codex/kzg-sparse-all-occupancies
Nov 26, 2026
Merged

BernardLowe merged 1 commit into
mainfrom
codex/kzg-sparse-all-occupancies

Conversation

@BernardLowe

Copy link
Copy Markdown
Contributor

Change

Use the sparse quotient for built-in CPU KZG openings at all 4,096-slot vector occupancies. Keep the dense calculation as the byte-level test oracle. The prover, accelerator interface, and verifier retain their existing contracts.

Measurement

A Linux/amd64 comparison built from b743b7d forced the two quotient implementations on the same deterministic vectors and checked every pair of proof bytes. Sparse timings include the index scan. Each of three processes per CPU budget alternated the order of the two paths and recorded 11 measured pairs after warm-up. These are local kernel latencies on S6, outside the public Prove wrapper.

Occupied slots, occupied target 1 CPU, sparse / dense (ms) 6 CPUs, sparse / dense (ms)
128 3.19 / 51.52 0.77 / 9.59
2,048 27.63 / 50.74 5.46 / 9.35
4,095 50.55 / 50.56 9.64 / 9.40
4,096 43.46 / 50.38 9.17 / 9.53

Table entries are medians of the three process medians. Empty-target openings also benefited at low occupancy and were generally near parity at high occupancy. The sampled high-occupancy points include small wins for dense, with sparse winning again on the full vector in all six processes.

Verification

Standalone Core tests, vet, build, and git diff --check. The existing KZG reference comparison covers occupancies 0 through 4,096 at selected points including 127, 128, and 129, compares proof and value bytes, and verifies the result.

@BernardLowe
BernardLowe marked this pull request as ready for review November 26, 2026 12:50
Copilot AI balanced review requested due to automatic review settings November 26, 2026 12:50
@BernardLowe
BernardLowe merged commit d56335e into main Nov 26, 2026
7 checks passed

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. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T12:51:04.332098Z dca7fc1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BernardLowe
BernardLowe deleted the codex/kzg-sparse-all-occupancies branch November 26, 2026 13:24
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.

2 participants