DocsCompute units

Compute units

A transaction may spend up to 1,400,000 compute units; an instruction gets 200,000 unless it asks for more. Pass units to raise a run's budget. A script that spends its budget stops with "Computational budget exceeded" and changes nothing. The units below are measured on the Weft program; the Weft VM in the browser meters with the same table, so the playground's meter reads close to the chain.

OpUnits
const / nil / true / false18
pop / dup57
load / store variable86
add / sub29
mul146
div / mod / idiv311
pow492
neg / not110
compare75
concat682 +89 per 16 bytes
jump39
branch37
call302 +85 per argument
return45
closure193
list122 +137 per item
map307 +471 per entry
index / set index352
call a builtin444 +85 per argument

A run that keeps storage pays for it once per run, beyond each load and store:

StorageUnits
First load or store1,358 +193 per stored value
Write back after a store2,957 +193 per stored value
Grow or create the account3,502 plus its rent, from the signer