Skip to content

Weigh GKR rows by a split equality table - #345

Merged
kevaundray merged 1 commit into
riscv-explorationfrom
perf/riscv-gkr-split-eq
Sep 30, 2026
Merged

kevaundray merged 1 commit into
riscv-explorationfrom
perf/riscv-gkr-split-eq

Conversation

@tcoratger

@tcoratger tcoratger commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Weigh the GKR's row pairs by a split equality table.

Each radix-four GKR round weighed its row pairs by a full eq table, one E value per pair, which the message read and a shrink pass marginalized every round. The table is now two, eq(r, x) = low[x mod 2^L] · high[x >> L]. The low one has at most 2^12 entries (96 KiB, read from L2), and both are rebuilt from the round's remaining point. A task sums its pairs against the low weights unreduced, and scales each run of pairs that shares a high weight once. The messages, and so the proofs, are unchanged.

Validation: a new test checks the split table and its weighted sums against the dense table, including ranges that cross the 2^12 boundary. The round-message tests now weigh by the split table. Release workspace tests, Clippy, rustdoc and formatting pass.

Benchmark

Ryzen 9 9950X3D (Zen 5, 16C/32T), rustc 1.98, target-cpu=native, --repeat 3, before and after alternated, two rounds each:

command Bus GKR proving
leanxmss --n 100 137 → 126 ms 0.627 → 0.613 s
fibonacci --n 2000000 295 → 273 ms 1.41 → 1.39 s

This is B14 of riscv-plan.md, stacked on #344.

🤖 Generated with Claude Code

@tcoratger
tcoratger added this pull request to stack #339 September 30, 2026 20:01
@tcoratger tcoratger changed the title gkr: weigh rows by a split equality table Weigh GKR rows by a split equality table Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🐰 Bencher Report

Projectleanvm
Branchpr/345
Testbedgithub-ubuntu-arm

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
flock-hash-batch-262144Latency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
4.73 s
(+7.82%)Baseline: 4.39 s
4.52 s
(104.68%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
fibonacci-asm-2000000📈 view plot
🚷 view threshold
6.49 s
(-8.98%)Baseline: 7.13 s
7.34 s
(88.37%)
flock-hash-batch-262144📈 view plot
🚷 view threshold
🚨 view alert (🔔)
4.73 s
(+7.82%)Baseline: 4.39 s
4.52 s
(104.68%)

hash-50000📈 view plot
🚷 view threshold
3.65 s
(-16.92%)Baseline: 4.39 s
4.52 s
(80.66%)
leansphincs-26📈 view plot
🚷 view threshold
2.87 s
(-5.84%)Baseline: 3.05 s
3.14 s
(91.42%)
leanxmss-100📈 view plot
🚷 view threshold
2.87 s
(-5.30%)Baseline: 3.03 s
3.12 s
(91.94%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🐰 Bencher Report

Projectleanvm
Branchpr/345
Testbedgithub-ubuntu

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
flock-hash-batch-262144Latency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
9.59 s
(+15.40%)Baseline: 8.31 s
8.56 s
(112.04%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
fibonacci-asm-2000000📈 view plot
🚷 view threshold
12.23 s
(-5.61%)Baseline: 12.96 s
13.34 s
(91.64%)
flock-hash-batch-262144📈 view plot
🚷 view threshold
🚨 view alert (🔔)
9.59 s
(+15.40%)Baseline: 8.31 s
8.56 s
(112.04%)

hash-50000📈 view plot
🚷 view threshold
7.33 s
(-11.70%)Baseline: 8.30 s
8.55 s
(85.73%)
leansphincs-26📈 view plot
🚷 view threshold
5.50 s
(+0.32%)Baseline: 5.48 s
5.65 s
(97.40%)
leanxmss-100📈 view plot
🚷 view threshold
5.42 s
(-0.34%)Baseline: 5.44 s
5.60 s
(96.75%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🐰 Bencher Report

Projectleanvm
Branchpr/345
Testbedubuntu-latest

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
Benchmarkcommittedwords x 1e6cyclescycles x 1e3proven-rowsrows x 1e3
fibonacci-asm-2000000📈 view plot
⚠️ NO THRESHOLD
90.32 x 1e6📈 view plot
⚠️ NO THRESHOLD
2,004.01 x 1e3📈 view plot
⚠️ NO THRESHOLD
2,097.21 x 1e3
hash-50000📈 view plot
⚠️ NO THRESHOLD
51.28 x 1e6📈 view plot
⚠️ NO THRESHOLD
704.35 x 1e3📈 view plot
⚠️ NO THRESHOLD
951.30 x 1e3
leanda-1📈 view plot
⚠️ NO THRESHOLD
253.80 x 1e6📈 view plot
⚠️ NO THRESHOLD
3,646.24 x 1e3📈 view plot
⚠️ NO THRESHOLD
5,537.82 x 1e3
leansphincs-104📈 view plot
⚠️ NO THRESHOLD
149.22 x 1e6📈 view plot
⚠️ NO THRESHOLD
2,326.79 x 1e3📈 view plot
⚠️ NO THRESHOLD
2,951.18 x 1e3
leanxmss-400📈 view plot
⚠️ NO THRESHOLD
149.04 x 1e6📈 view plot
⚠️ NO THRESHOLD
2,455.79 x 1e3📈 view plot
⚠️ NO THRESHOLD
2,949.14 x 1e3
🐰 View full continuous benchmarking report in Bencher

@kevaundray
kevaundray force-pushed the perf/riscv-gkr-split-eq branch 4 times, most recently from 8f07ab5 to 00ca40c Compare September 30, 2026 21:01
Base automatically changed from perf/riscv-pool-barrier to riscv-exploration September 30, 2026 21:15
Each radix-four GKR round weighed its row pairs by a full eq table, one E
value per pair, read by the message and marginalized by a shrink pass every
round. The table is now two: eq(r, x) = low[x mod 2^L] * high[x >> L], the
low one at most 2^12 entries (96 KiB, read from L2), both rebuilt from the
round's remaining point. A task sums its pairs against the low weights
unreduced, and scales each run of pairs sharing a high weight once. The
messages, and so proofs, are unchanged.

A new test checks the split table and its weighted sums against the dense
table, across the 2^12 boundary; the round-message tests now weigh by it.

Host: Ryzen 9 9950X3D (Zen 5, 16C/32T), rustc 1.98, target-cpu=native.
--repeat 3, before/after alternated, two rounds each:

                          Bus GKR           proving
  leanxmss --n 100        137 -> 126 ms     0.627 -> 0.613 s
  fibonacci --n 2000000   295 -> 273 ms     1.41 -> 1.39 s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kevaundray
kevaundray force-pushed the perf/riscv-gkr-split-eq branch from 00ca40c to ccc69b8 Compare September 30, 2026 21:15
@kevaundray
kevaundray merged commit 228a2e0 into riscv-exploration Sep 30, 2026
10 checks passed
@tcoratger
tcoratger deleted the perf/riscv-gkr-split-eq branch October 1, 2026 10:47
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