Skip to content

Feat/fext accelerator#818

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

Feat/fext accelerator#818
jotabulacios wants to merge 13 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 2.6 ± 0.1 2.4 2.9 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head hashmap 91.2 ± 3.5 87.3 99.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head keccak 96.4 ± 4.7 89.1 104.7 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head syscall_commit 74.0 ± 2.2 70.7 77.7 1.00

@github-actions

Copy link
Copy Markdown

Benchmark Results for unmodified programs 🚀

Command Mean [ms] Min [ms] Max [ms] Relative
base binary_search 43.2 ± 1.6 41.2 46.0 1.02 ± 0.05
head binary_search 42.2 ± 1.2 40.9 44.5 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base bitwise_ops 44.1 ± 2.3 41.5 47.8 1.00
head bitwise_ops 46.3 ± 2.9 41.9 50.6 1.05 ± 0.09
Command Mean [ms] Min [ms] Max [ms] Relative
base fibonacci_26 45.1 ± 1.1 43.8 46.7 1.02 ± 0.04
head fibonacci_26 44.1 ± 1.1 42.7 45.6 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base matrix_multiply 48.9 ± 1.6 46.8 52.1 1.00
head matrix_multiply 50.1 ± 5.0 43.3 57.2 1.03 ± 0.11
Command Mean [ms] Min [ms] Max [ms] Relative
base modular_exp 42.2 ± 1.2 41.2 44.9 1.00
head modular_exp 43.2 ± 1.5 41.4 45.5 1.02 ± 0.05
Command Mean [ms] Min [ms] Max [ms] Relative
base quicksort 44.9 ± 1.6 43.3 48.5 1.00
head quicksort 49.9 ± 2.9 45.5 53.3 1.11 ± 0.08
Command Mean [ms] Min [ms] Max [ms] Relative
base sieve 47.8 ± 3.1 45.2 52.7 1.03 ± 0.07
head sieve 46.3 ± 1.2 44.7 47.9 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base sum_array 53.6 ± 1.2 51.6 55.0 1.00
head sum_array 54.7 ± 1.7 52.5 58.2 1.02 ± 0.04

@jotabulacios jotabulacios marked this pull request as ready for review July 16, 2026 19:00
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.

1 participant