User Tools

Site Tools


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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dido:public:ra:xapend:xapend.a_glossary:e:ethereum_memory [2021/12/29 00:25]
nick ↷ Page name changed from dido:public:ra:xapend:xapend.a_glossary:e:etereum_memory to dido:public:ra:xapend:xapend.a_glossary:e:ethereum_memory
dido:public:ra:xapend:xapend.a_glossary:e:ethereum_memory [2021/12/29 00:26] (current)
nick
Line 3: Line 3:
  
 **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. **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: [[dido:​public:​ra:​xapend:​xapend.a_glossary:​e:​ethereum_storage]]
  
 Source: [[https://​ethereum.stackexchange.com/​questions/​1232/​difference-between-memory-and-storage/​1235 ]] Source: [[https://​ethereum.stackexchange.com/​questions/​1232/​difference-between-memory-and-storage/​1235 ]]
dido/public/ra/xapend/xapend.a_glossary/e/ethereum_memory.1640755507.txt.gz · Last modified: 2021/12/29 00:25 by nick