Skip to content

Conversation

@edg-l
Copy link
Contributor

@edg-l edg-l commented Jan 5, 2026

Motivation

Removed a vec alloc and a U256 conversion that could be avoided

Tried to run the benchmarks but unrelated things improve and regress, so i think its a bit flaky, this PR only changed the precompile function so its hard to imagine how it affects that

@github-actions github-actions bot added L1 Ethereum client performance Block execution throughput and performance in general labels Jan 5, 2026
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Lines of code report

Total lines added: 18
Total lines removed: 0
Total lines changed: 18

Detailed view
+------------------------------------------+-------+------+
| File                                     | Lines | Diff |
+------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/precompiles.rs | 1751  | +18  |
+------------------------------------------+-------+------+

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

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 2.990 ± 0.014 2.963 3.015 1.00
main_levm_BubbleSort 3.105 ± 0.041 3.068 3.190 1.04 ± 0.01
pr_revm_BubbleSort 3.003 ± 0.027 2.972 3.052 1.00 ± 0.01
pr_levm_BubbleSort 3.089 ± 0.019 3.065 3.127 1.03 ± 0.01

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 981.2 ± 6.9 973.6 992.6 1.00
main_levm_ERC20Approval 1087.9 ± 7.6 1079.5 1100.4 1.11 ± 0.01
pr_revm_ERC20Approval 1018.7 ± 7.9 1007.3 1030.9 1.04 ± 0.01
pr_levm_ERC20Approval 1093.0 ± 30.8 1073.5 1179.0 1.11 ± 0.03

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 133.2 ± 1.8 130.9 137.0 1.00
main_levm_ERC20Mint 164.5 ± 2.2 162.9 170.0 1.24 ± 0.02
pr_revm_ERC20Mint 135.5 ± 1.1 133.5 137.3 1.02 ± 0.02
pr_levm_ERC20Mint 164.7 ± 1.3 163.3 167.5 1.24 ± 0.02

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 233.3 ± 2.1 231.4 237.4 1.00
main_levm_ERC20Transfer 277.9 ± 5.5 273.6 290.5 1.19 ± 0.03
pr_revm_ERC20Transfer 238.1 ± 2.2 235.2 241.1 1.02 ± 0.01
pr_levm_ERC20Transfer 273.9 ± 2.0 271.1 277.3 1.17 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 224.9 ± 0.8 223.3 225.8 1.00
main_levm_Factorial 268.7 ± 5.6 265.2 284.5 1.19 ± 0.03
pr_revm_Factorial 225.1 ± 0.7 223.9 226.3 1.00 ± 0.00
pr_levm_Factorial 266.0 ± 1.4 264.3 268.3 1.18 ± 0.01

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.661 ± 0.031 1.615 1.693 1.02 ± 0.03
main_levm_FactorialRecursive 8.396 ± 0.042 8.314 8.454 5.17 ± 0.10
pr_revm_FactorialRecursive 1.624 ± 0.030 1.556 1.666 1.00
pr_levm_FactorialRecursive 8.355 ± 0.041 8.288 8.416 5.14 ± 0.10

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 205.9 ± 0.8 205.1 207.1 1.00 ± 0.01
main_levm_Fibonacci 261.9 ± 5.8 250.2 273.8 1.28 ± 0.03
pr_revm_Fibonacci 205.0 ± 1.1 202.4 206.4 1.00
pr_levm_Fibonacci 261.4 ± 3.2 252.7 263.7 1.28 ± 0.02

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 888.7 ± 8.5 872.9 900.6 1.21 ± 0.04
main_levm_FibonacciRecursive 737.1 ± 20.2 692.7 757.5 1.00
pr_revm_FibonacciRecursive 867.9 ± 8.3 847.7 878.9 1.18 ± 0.03
pr_levm_FibonacciRecursive 757.3 ± 15.3 744.6 790.3 1.03 ± 0.03

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 8.5 ± 0.1 8.4 8.6 1.00
main_levm_ManyHashes 9.2 ± 0.3 9.0 9.9 1.09 ± 0.03
pr_revm_ManyHashes 8.6 ± 0.1 8.4 8.7 1.01 ± 0.01
pr_levm_ManyHashes 9.2 ± 0.2 9.0 9.6 1.08 ± 0.02

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 262.4 ± 5.5 259.6 277.8 1.09 ± 0.02
main_levm_MstoreBench 243.6 ± 3.6 239.2 250.0 1.01 ± 0.02
pr_revm_MstoreBench 261.8 ± 4.7 258.7 274.5 1.09 ± 0.02
pr_levm_MstoreBench 241.2 ± 1.1 239.7 243.2 1.00

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 288.0 ± 1.0 286.4 289.4 1.00
main_levm_Push 314.3 ± 4.2 311.0 324.5 1.09 ± 0.01
pr_revm_Push 291.4 ± 4.9 287.6 303.1 1.01 ± 0.02
pr_levm_Push 317.2 ± 19.9 308.8 373.7 1.10 ± 0.07

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 169.3 ± 5.4 159.7 173.0 1.87 ± 0.08
main_levm_SstoreBench_no_opt 93.4 ± 5.7 89.1 106.3 1.03 ± 0.07
pr_revm_SstoreBench_no_opt 170.6 ± 8.0 159.7 190.3 1.88 ± 0.11
pr_levm_SstoreBench_no_opt 90.6 ± 2.8 88.7 97.8 1.00

@edg-l edg-l marked this pull request as ready for review January 5, 2026 12:18
@edg-l edg-l requested a review from a team as a code owner January 5, 2026 12:18
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Jan 5, 2026
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Benchmark Block Execution Results Comparison Against Main

Command Mean [s] Min [s] Max [s] Relative
base 65.493 ± 0.428 64.740 66.258 1.00
head 65.660 ± 0.407 65.222 66.550 1.00 ± 0.01

@edg-l edg-l added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit 4a4e5c9 Jan 13, 2026
64 checks passed
@edg-l edg-l deleted the improve_ecrecover branch January 13, 2026 13:39
@github-project-automation github-project-automation bot moved this from Todo to Done in ethrex_performance Jan 13, 2026
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client performance Block execution throughput and performance in general

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants