User Tools

Site Tools


Sidebar

Welcome to DIDO WIKI

dido:public:ra:xapend:xapend.a_glossary:e:ethereum_memory

Ethereum Memory

Return to Glossary

Ethereum Memory (or Memory) is a byte-array. Memory starts off zero-size, but can be expanded in 32-byte chunks by simply accessing or storing memory at indices greater than its current size. Since memory is contiguous, it does save gas to keep it packed and shrink its size, instead of having large patches of zeros. It's cheaper to have an array of length 2 storing 2 values, than an array of length 1000 where the values are at the ends of the array and the middle is all zeros.

See: Ethereum Storage

Source: https://ethereum.stackexchange.com/questions/1232/difference-between-memory-and-storage/1235

dido/public/ra/xapend/xapend.a_glossary/e/ethereum_memory.txt · Last modified: 2021/12/29 00:26 by nick
Translations of this page: