Skip to content

Feat/fext accelerator#818

Open
jotabulacios wants to merge 22 commits into
mainfrom
feat/fext-accelerator
Open

Feat/fext accelerator#818
jotabulacios wants to merge 22 commits into
mainfrom
feat/fext-accelerator

Conversation

@jotabulacios

@jotabulacios jotabulacios commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Recursion — the STARK verifier running as an in-VM guest — spends most of its
arithmetic in the VM's native degree-3 Goldilocks extension field
Fp3 = Fp[x]/(x³ − 2) (DEEP composition, FRI folding, constraint evaluation). As
plain RISC-V, one Fp3 multiply-add expands to a dozen-plus field mul/adds plus
the surrounding load/store traffic, all charged to the CPU, MEMW and LT tables.

This PR adds the FEXT precompile (spec PR #809, spec/fext): a·b + c over Fp3
in a single ecall, backed by a small degree-2 AIR — the Fp3 analog of the existing
KECCAK/ECSM accelerators

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Benchmark Results for modified programs 🚀

Command Mean [ms] Min [ms] Max [ms] Relative
head ecsm 3.2 ± 0.1 3.1 3.4 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head hashmap 138.6 ± 2.1 135.3 141.8 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head keccak 131.8 ± 3.7 127.3 138.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head syscall_commit 91.5 ± 2.4 90.2 98.2 1.00

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Benchmark Results for unmodified programs 🚀

Command Mean [ms] Min [ms] Max [ms] Relative
base binary_search 59.6 ± 0.7 58.7 60.6 1.00
head binary_search 63.4 ± 1.2 62.0 66.3 1.06 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base bitwise_ops 58.5 ± 0.2 58.2 58.9 1.00
head bitwise_ops 62.2 ± 1.1 61.1 64.0 1.06 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base fibonacci_26 63.4 ± 0.7 62.7 64.7 1.00
head fibonacci_26 68.0 ± 0.9 66.9 69.6 1.07 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base matrix_multiply 65.4 ± 0.6 64.8 67.0 1.00
head matrix_multiply 69.3 ± 1.4 67.2 71.7 1.06 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base modular_exp 60.4 ± 1.5 58.6 63.1 1.00
head modular_exp 62.5 ± 0.7 61.4 63.9 1.04 ± 0.03
Command Mean [ms] Min [ms] Max [ms] Relative
base quicksort 63.5 ± 0.5 62.6 64.0 1.00
head quicksort 67.7 ± 0.5 66.8 68.5 1.07 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base sieve 65.4 ± 0.6 64.7 66.2 1.00
head sieve 69.5 ± 0.5 69.1 70.8 1.06 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base sum_array 74.1 ± 1.1 73.3 76.8 1.00
head sum_array 78.3 ± 0.6 77.6 79.2 1.06 ± 0.02

@jotabulacios
jotabulacios marked this pull request as ready for review July 16, 2026 19:00
@jotabulacios
jotabulacios force-pushed the feat/fext-accelerator branch from 2f8ac34 to 3bf6794 Compare July 17, 2026 12:20
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