Skip to content

Conversation

SDartayet
Copy link
Contributor

Motivation

Cleaning up our code, both in terms of funcionality and performance.

Description

Part of #4668. This PR specifically addresses the clones in the VM crate

@github-actions github-actions bot added the L1 Ethereum client label Oct 2, 2025
Copy link

github-actions bot commented Oct 2, 2025

Benchmark Results Comparison

No significant difference was registered for any benchmark run.

Detailed Results

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
main_revm_BubbleSort 4.841 ± 0.011 4.823 4.865 1.05 ± 0.00
main_levm_BubbleSort 4.650 ± 0.046 4.615 4.770 1.01 ± 0.01
pr_revm_BubbleSort 4.808 ± 0.018 4.788 4.839 1.04 ± 0.00
pr_levm_BubbleSort 4.625 ± 0.014 4.604 4.650 1.00

Benchmark Results: ERC20Approval

Command Mean [s] Min [s] Max [s] Relative
main_revm_ERC20Approval 1.567 ± 0.007 1.560 1.579 1.01 ± 0.01
main_levm_ERC20Approval 1.651 ± 0.005 1.639 1.658 1.06 ± 0.01
pr_revm_ERC20Approval 1.556 ± 0.008 1.548 1.571 1.00
pr_levm_ERC20Approval 1.648 ± 0.018 1.630 1.694 1.06 ± 0.01

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 188.6 ± 0.6 187.5 189.5 1.01 ± 0.01
main_levm_ERC20Mint 201.6 ± 1.7 199.5 204.3 1.08 ± 0.01
pr_revm_ERC20Mint 186.7 ± 1.5 185.1 190.2 1.00
pr_levm_ERC20Mint 200.0 ± 3.4 197.3 208.5 1.07 ± 0.02

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 356.9 ± 1.7 354.4 361.0 1.01 ± 0.01
main_levm_ERC20Transfer 388.7 ± 1.9 386.7 392.9 1.10 ± 0.01
pr_revm_ERC20Transfer 352.4 ± 0.7 351.3 353.7 1.00
pr_levm_ERC20Transfer 386.3 ± 3.0 381.7 390.8 1.10 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 239.2 ± 0.4 238.2 239.6 1.00
main_levm_Factorial 275.5 ± 1.0 274.0 277.0 1.15 ± 0.00
pr_revm_Factorial 242.6 ± 2.5 239.2 246.1 1.01 ± 0.01
pr_levm_Factorial 278.3 ± 1.8 276.9 282.8 1.16 ± 0.01

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.641 ± 0.050 1.510 1.686 1.00
main_levm_FactorialRecursive 9.066 ± 0.128 8.878 9.243 5.52 ± 0.19
pr_revm_FactorialRecursive 1.666 ± 0.016 1.650 1.697 1.02 ± 0.03
pr_levm_FactorialRecursive 9.044 ± 0.124 8.897 9.229 5.51 ± 0.19

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 217.4 ± 1.0 216.5 219.7 1.00
main_levm_Fibonacci 258.3 ± 1.3 257.2 261.8 1.19 ± 0.01
pr_revm_Fibonacci 217.7 ± 2.7 215.8 224.2 1.00 ± 0.01
pr_levm_Fibonacci 258.1 ± 0.7 257.2 259.1 1.19 ± 0.01

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 908.2 ± 22.2 881.1 966.9 1.01 ± 0.03
main_levm_FibonacciRecursive 1098.7 ± 6.4 1090.4 1113.0 1.22 ± 0.02
pr_revm_FibonacciRecursive 901.0 ± 13.5 869.1 914.2 1.00
pr_levm_FibonacciRecursive 1097.6 ± 5.6 1089.8 1111.0 1.22 ± 0.02

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 12.5 ± 0.1 12.4 12.6 1.00
main_levm_ManyHashes 13.8 ± 0.1 13.7 14.0 1.11 ± 0.01
pr_revm_ManyHashes 12.6 ± 0.1 12.4 12.8 1.01 ± 0.01
pr_levm_ManyHashes 13.8 ± 0.1 13.7 14.0 1.10 ± 0.01

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 261.4 ± 1.5 259.4 264.8 1.00
main_levm_MstoreBench 795.4 ± 2.2 792.5 798.9 3.04 ± 0.02
pr_revm_MstoreBench 262.1 ± 3.7 258.9 269.1 1.00 ± 0.02
pr_levm_MstoreBench 795.2 ± 2.5 790.9 799.3 3.04 ± 0.02

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 294.4 ± 1.0 293.0 296.2 1.00 ± 0.00
main_levm_Push 889.2 ± 2.4 887.4 895.6 3.03 ± 0.01
pr_revm_Push 293.9 ± 0.8 292.4 295.1 1.00
pr_levm_Push 882.3 ± 0.8 881.4 884.3 3.00 ± 0.01

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 220.4 ± 5.9 217.3 237.0 2.41 ± 0.07
main_levm_SstoreBench_no_opt 91.6 ± 1.4 89.8 93.0 1.00
pr_revm_SstoreBench_no_opt 220.1 ± 1.9 217.5 223.8 2.40 ± 0.04
pr_levm_SstoreBench_no_opt 92.3 ± 2.1 90.0 97.2 1.01 ± 0.03

Copy link

github-actions bot commented Oct 2, 2025

Lines of code report

Total lines added: 8
Total lines removed: 0
Total lines changed: 8

Detailed view
+--------------------------------------------------------+-------+------+
| File                                                   | Lines | Diff |
+--------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/eth/transaction.rs        | 572   | +1   |
+--------------------------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/mod.rs                  | 464   | +3   |
+--------------------------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/tracing.rs              | 61    | +1   |
+--------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/vm.rs                        | 456   | +1   |
+--------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state/runner/levm_runner.rs    | 456   | +1   |
+--------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state_v2/src/modules/runner.rs | 222   | +1   |
+--------------------------------------------------------+-------+------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L1 Ethereum client
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant