Hey everyone
The ink! Alliance would like to share the results of a recent benchmark comparing a smart contract written in Bare Rust vs ink!, using the exact same contract: Mixocracy, a decentralized DJ voting platform with 25 public functions.
The results show where ink! shines, where it still needs refinement, and most importantly how it’s evolving to deliver a world-class Rust smart contract language with supreme developer experience and high performance, within the Polkadot ecosystem.
TL;DR Benchmark Results
Note: Both contracts were not built with optimization in mind, so the results should be taken with care. Probably the Bare Rust contract could win more from those optimisation gaines.
| Category | Winner | Notes |
|---|---|---|
| Code Size | ink! | 3x fewer lines of code |
| Binary Size | ink! | 11% smaller |
| Instructions | ink! | 12% fewer RISC-V instructions |
| Deployment Cost | ink! | 11% cheaper |
| Gas Usage | ~Draw | Only ~1% difference |
| Build Time | Bare Rust | 7x faster clean build |
| Dependencies | Bare Rust | 20x fewer crates |
| Boilerplate | ink! | 45% of Bare Rust was boilerplate auto-generated by ink! |
| Type Safety | ink! | Compile-time safety vs runtime panics |
| Testing Support | ink! | Built-in #[ink::test] and e2e |
| Control/Flexibility | Bare Rust | Full low-level access |
Full report: BENCHMARK_REPORT.md
What This Means
ink! makes building smart contracts simpler, safer, and faster (except compile time) without sacrificing performance.
The ink! implementation was 3x smaller in code, had fewer instructions, and still deployed more cheaply, all while providing auto-generated dispatch, ABI encoding, storage keys, and metadata that Bare Rust requires you to do yourself.
Over 40% of the Bare Rust implementation was just dispatch logic and storage boilerplate. With ink!, that’s gone.
This is a huge win for onboarding, productivity, and long-term maintainability.
Developer Experience: Built for Productivity
Using ink! instead of plain Rust dramatically reduces friction and the potential for errors.
ink! provides built‑in support for:
-
ABIs (both native SCALE and Solidity)
-
Typed storage and contract‑optimized data structures
-
Dispatch code generation and cross‑contract calls
-
Event handling and metadata generation
-
A full tooling ecosystem for compilation, testing, and front‑end integration
On top of this, the ink! e2e testing framework makes it easy to write end‑to‑end tests in pure Rust (including interaction with the runtime), and Pop CLI provides a seamless workflow for building, testing, deploying, and interacting with contracts.
In contrast, a low‑level Rust contract on pallet‑revive leaves all of that to you; storage layout, ABI handling, metadata, serialization, and even tooling integration must be implemented manually.
For most developers and most use‑cases, this makes ink! far more productive, safer, and maintainable than “rolling your own” with raw Rust and FFI. The result is faster iteration, fewer bugs, and a significantly better developer experience.
What’s Next for ink!
Our focus this past year has been on PolkaVM support and developer experience, and that work is still ongoing. But as ink! stabilizes, we’re also starting to explore language-level optimizations (e.g. reducing compile times).
The goal is clear: make ink! not just easier to use, but faster, smaller, and more powerful!