I saw Big map on Tezos contract but I don't really understand what is it. Someone can explain to me ?
Many thanks!
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.
Sign up to join this communityI saw Big map on Tezos contract but I don't really understand what is it. Someone can explain to me ?
Many thanks!
Big maps are lazily deserialized. This means that only the part of the big map that is accessed or updated is read from disk and the gas costs for accessing and updating a big map don't depend on the size of the big map.
Regular maps by contrast are fully deserialized before the beginning of the execution of the contract and the gas costs for MEM
, GET
, and UPDATE
are proportional to the logarithm of the size of the map.
Comparing the documentation for big maps to that of regular maps should help. In short, big maps induce lower gas costs in most use cases, but have some constraints. Notably, it is not possible to iterate over the keys in a big map.