Skip to content

Conversation

@pgherveou
Copy link
Collaborator

@pgherveou pgherveou commented Dec 10, 2025

Basic benchmark on a simplified Contract that mint and transfer tokens

Setups

# start the chain
# using https://github.com/paritytech/polkadot-sdk/pull/10612 
revive_dev_stack

# build and deploy
deno task token_benchmark

Results

## Mint Operation

┌───────────────────────┬──────────┬────────┬────────────┬────────────┬────────────┬──────────────┐
│ Implementation        │ Gas Used │ Gas %  │ Ref Time   │ Ref Time % │ Proof Size │ Proof Size % │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ EVM - solidity        │ 520147   │ 109.5% │ 2027338949 │ 100.0%     │ 58298      │ 100.0%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - solidity        │ 521464   │ 109.8% │ 2093175823 │ 103.2%     │ 63475      │ 108.9%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - Ink!            │ 474988   │ 100.0% │ 2329388238 │ 114.9%     │ 66779      │ 114.5%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - Rust with alloc │ 531380   │ 111.9% │ 2268976154 │ 111.9%     │ 82166      │ 140.9%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - Rust no alloc   │ 521627   │ 109.8% │ 2101300738 │ 103.6%     │ 62604      │ 107.4%       │
└───────────────────────┴──────────┴────────┴────────────┴────────────┴────────────┴──────────────┘

## Transfer Operation

┌───────────────────────┬──────────┬────────┬────────────┬────────────┬────────────┬──────────────┐
│ Implementation        │ Gas Used │ Gas %  │ Ref Time   │ Ref Time % │ Proof Size │ Proof Size % │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ EVM - solidity        │ 467942   │ 100.0% │ 2057050335 │ 100.0%     │ 58330      │ 100.0%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - solidity        │ 469758   │ 100.4% │ 2147886237 │ 104.4%     │ 63539      │ 108.9%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - Ink!            │ 481513   │ 102.9% │ 2655603375 │ 129.1%     │ 87357      │ 149.8%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - Rust with alloc │ 476702   │ 101.9% │ 2335061330 │ 113.5%     │ 82230      │ 141.0%       │
├───────────────────────┼──────────┼────────┼────────────┼────────────┼────────────┼──────────────┤
│ PVM - Rust no alloc   │ 469957   │ 100.4% │ 2157847164 │ 104.9%     │ 62636      │ 107.4%       │
└───────────────────────┴──────────┴────────┴────────────┴────────────┴────────────┴──────────────┘

┌───────────────────────┬───────────────────┬─────────┐
│ Implementation        │ Code Size (bytes) │ Size %  │
├───────────────────────┼───────────────────┼─────────┤
│ EVM - solidity        │ 560               │ 100.0%  │
├───────────────────────┼───────────────────┼─────────┤
│ PVM - solidity        │ 5241              │ 935.9%  │
├───────────────────────┼───────────────────┼─────────┤
│ PVM - Ink!            │ 8481              │ 1514.5% │
├───────────────────────┼───────────────────┼─────────┤
│ PVM - Rust with alloc │ 23932             │ 4273.6% │
├───────────────────────┼───────────────────┼─────────┤
│ PVM - Rust no alloc   │ 4370              │ 780.4%  │
└───────────────────────┴───────────────────┴─────────┘

@pgherveou pgherveou merged commit 1450a7e into main Dec 11, 2025
2 checks passed
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.

2 participants