Performance benchmarks comparing Solidity and Stylus smart contracts across different optimization levels and use cases.
- ERC20 Functions: Standard token operations (totalSupply, allowance, approve, transfer) tested across WASM optimized, cached, and non-cached scenarios
- Mathematical Computations: Straight line equation (
y = mx + b
) with 50 iterations to measure computational efficiency. This benchmark tests basic arithmetic operations, loop performance, and function call overhead in both languages.
solidity_vs_stylus_comparison.md
: Complete gas cost analysis with detailed observations and conclusionsstylus_vs_solidity_charts.html
: Interactive bar charts and performance visualizations with hover effects
To view the interactive charts:
- Enable GitHub Pages in your repository settings
- Navigate to Interactive Charts
- Or download the HTML file and open it locally in your browser
- https://github.com/OpenZeppelin/rust-contracts-stylus/actions/runs/14862050430/job/41729229091 (section run benches)
- https://github.com/alephao/solidity-benchmarks/tree/main/benchmarks/0.8.24 (comparison benchmarks for referenced Stylus benchmarks)