Hitchhiker’s Guide to the EVM
summary
Explains five concrete EVM optimizations: replace unused persistent mappings with events to save about 25,000 gas on a transfer, use constant/immutable to cut a read from ~2,500 gas to ~450, avoid repeated sload/sstore by caching to memory (saves ~500 gas in tested case due to EIP‑2929 cold/warm behavior), use smaller types like uint96 and reorder struct fields to pack slots (halves storage slots), and mark storage names so reads/writes are obvious.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:30Topics
- 1:27Gas Golfing
- 4:29Dont Store
- 6:32Use Constants
- 8:27Make it Obvious
- 9:35Dont ReadWrite Too Often
- 12:41Pack Your structs
- 14:00Structure
- 14:41Storage
- 16:25Uint 96
- 17:26Two Slots
- 18:54Recap
- 19:51Outro
related talks
25mZk x EVM
30mThe Solidity Optimizooooor
24mWhat’s in a VM? The Execution Engines Powering Web3’s Future
27mSmart Transactions
23mSynthesizing Efficient Super-Instruction Sets for Ethereum Virtual Machine
15mPrecise Static Modeling of Ethereum “Memory”
15mHEMVM: a Heterogeneous Blockchain Framework for Interoperable Virtual Machines
01h 02mMemory and Compilers
