This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Cannon Performance Notes
norswap edited this page May 18, 2022
·
2 revisions
This page now lives on the Cannon wiki
These are some notes taken from conversations with geohot about where Cannon's time is spent.
- Go runtime initialize: about 11M instructions. These could be folded into
golden.json
to exclude them from the trace (i.e. take the initial memory snapshot after initialization of the Go runtime) - Cannon uses about 5-10M of instructions to process a transaction.
- 40% of Cannon's time is spent doing Keccak.
- Hence we could reduce the size of the trace by almost 40% by replacing Keccak calls by a custom MIPS opcode.
- 20% is spent in ECDSA calculations
Execution speed figures:
- the unicorn configuration runs at 10MHz (i.e. 10M instructions per second) (~1 sec per tx)
- the evm configuration runs at around 100KHz (~2 min per tx)
- the chain configuration runs at around 1KHz (~3 hrs per tx)
Check the Cannon Overview for information on the mipsevm configurations.