Skip to content

refactor(new-execution): optimize E1/E2 implementation#1827

Merged
nyunyunyunyu merged 24 commits into
feat/new-executionfrom
feat/e12-fn-dispatch
Jul 15, 2025
Merged

refactor(new-execution): optimize E1/E2 implementation#1827
nyunyunyunyu merged 24 commits into
feat/new-executionfrom
feat/e12-fn-dispatch

Conversation

@nyunyunyunyu

Copy link
Copy Markdown
Contributor

No description provided.

nyunyunyunyu and others added 11 commits July 7, 2025 14:30
- implemented e1 for all native chips
- added a `test_vm_e1_native_chips` that does e1 execution for all chips
except poseidon2 verify_batch

---------

Co-authored-by: Xinding Wei <weixinding@gmail.com>
…1814)

- added fn pointer based e1 for algebra/ecc chips
- fixed some execute functions to match the spec. details in comments

---------

Co-authored-by: Xinding Wei <weixinding@gmail.com>
@nyunyunyunyu nyunyunyunyu changed the base branch from main to feat/new-execution July 8, 2025 22:59
@codspeed-hq

codspeed-hq Bot commented Jul 8, 2025

Copy link
Copy Markdown

CodSpeed WallTime Performance Report

Merging #1827 will improve performances by ×3.8

Comparing feat/e12-fn-dispatch (0abeb61) with feat/new-execution (9315f1a)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 18 improvements
✅ 2 untouched benchmarks
🆕 4 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark_execute[bubblesort] 403.7 ms 171.5 ms ×2.4
benchmark_execute[factorial_iterative_u256] 1,166.2 ms 307.7 ms ×3.8
benchmark_execute[fibonacci_iterative] 464.2 ms 186.9 ms ×2.5
benchmark_execute[fibonacci_recursive] 608.3 ms 211.2 ms ×2.9
benchmark_execute[keccak256] 443.4 ms 160.6 ms ×2.8
benchmark_execute[keccak256_iter] 685.8 ms 269.7 ms ×2.5
🆕 benchmark_execute[pairing] N/A 421.9 ms N/A
benchmark_execute[quicksort] 451.6 ms 164.2 ms ×2.8
🆕 benchmark_execute[revm_transfer] N/A 280.9 ms N/A
benchmark_execute[sha256] 436.5 ms 159.7 ms ×2.7
benchmark_execute[sha256_iter] 704.6 ms 251.2 ms ×2.8
benchmark_execute_metered[bubblesort] 614.7 ms 233.6 ms ×2.6
benchmark_execute_metered[factorial_iterative_u256] 1,944.5 ms 563.5 ms ×3.5
benchmark_execute_metered[fibonacci_iterative] 675.9 ms 212.7 ms ×3.2
benchmark_execute_metered[fibonacci_recursive] 953 ms 304.9 ms ×3.1
benchmark_execute_metered[keccak256] 699.1 ms 225.4 ms ×3.1
benchmark_execute_metered[keccak256_iter] 1,136.3 ms 387.4 ms ×2.9
🆕 benchmark_execute_metered[pairing] N/A 458.9 ms N/A
benchmark_execute_metered[quicksort] 696.7 ms 238.9 ms ×2.9
🆕 benchmark_execute_metered[revm_transfer] N/A 335.8 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

shuklaayush and others added 4 commits July 9, 2025 09:07
…1` (#1823)

- make `execute_e1` use interpreter instance
Co-authored-by: Xinding Wei <weixinding@gmail.com>
Co-authored-by: Ayush Shukla <shuklaayush247@gmail.com>
Co-authored-by: Ayush Shukla <ayush@axiom.xyz>
@shuklaayush shuklaayush changed the title [HOLD] refactor: E1/E2 implementation refactor(new-execution): optimize E1/E2 implementation Jul 14, 2025
- name: Build benchmarks
working-directory: benchmarks/execute
run: cargo codspeed build
run: cargo codspeed build --profile maxperf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

were we going to revert this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we want to benchmark with maxperf?

@github-actions

This comment has been minimized.

Comment thread Cargo.toml Outdated
Comment thread benchmarks/execute/benches/execute.rs Outdated
Comment thread crates/sdk/tests/integration_test.rs Outdated
Comment thread crates/sdk/tests/integration_test.rs Outdated

@jonathanpwang jonathanpwang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can merge first to expedite, but please resolve the existing comments

@github-actions

This comment has been minimized.

@shuklaayush shuklaayush 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.

comments

Comment thread extensions/rv32im/tests/src/lib.rs Outdated
Comment thread extensions/rv32im/tests/src/lib.rs Outdated
Comment thread extensions/rv32im/tests/programs/examples/hashmap.rs Outdated
Comment thread extensions/rv32im/circuit/src/loadstore/core.rs Outdated
Comment thread extensions/rv32im/circuit/src/load_sign_extend/core.rs Outdated
Comment thread crates/vm/src/utils/stark_utils.rs Outdated
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (+14 [+1.1%]) 1,246 322,648 17,270,578 - - -
fibonacci (+4 [+0.2%]) 2,349 1,500,277 50,589,231 - - -
regex (-38 [-0.5%]) 6,959 4,165,432 166,449,586 - - -
ecrecover (+38 [+2.7%]) 1,424 137,283 8,179,549 - - -
pairing (-11 [-0.3%]) 4,001 1,862,964 102,530,853 - - -

Commit: 0abeb61

Benchmark Workflow

@nyunyunyunyu nyunyunyunyu merged commit e027992 into feat/new-execution Jul 15, 2025
34 of 35 checks passed
@nyunyunyunyu nyunyunyunyu deleted the feat/e12-fn-dispatch branch July 15, 2025 04:04
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