Cairo course

Cairo Level 13: Performance

Performance is level 13 of 14 of the LoWisa Cairo course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Execution and Storage Cost

  • Step budgets. Functions cost steps: measured by the runner, budgeted like gas.
  • Builtin usage. Hashes and range checks spend builtins: counted and optimised where hot.
  • Storage economics. Storage writes carry L1 data costs: lean state is the fee lever.

Efficient Contract Patterns

  • Batch and pack. Batching amortises overhead; packed storage trims data costs: measured trade-offs.
  • Off-chain with proofs. Heavy computation moves off-chain under proofs: the chain verifies, never re-computes.
  • Event-based history. History lives in events: indexers reconstructing state cheaply off-chain.

Production Optimisation

  • Profile the runner. Optimisation starts from runner reports: steps per entry point, tracked per commit.
  • Readability guard again. An optimisation obscuring an invariant is a loss: audits cost more than steps.
  • Benchmark per upgrade. Compiler and network upgrades shift costs: re-measure per release, assume nothing.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Cairo Level 13: Performance cover?

Execution and Storage Cost, Efficient Contract Patterns, Production Optimisation: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 12: Proof-Oriented Execution, which covers Sierra and CASM Concepts, Provable Computation, Understanding Cairo's Unique Runtime.

Learn Cairo on your phone

The first level is free. LoWisa is on Google Play and the App Store.