Link to this headingEVM
Stack: There is a max of 1024 variables that can be on the stack. Each variable can only be a max of 32 bytes
Memory: Uses Gas to store larger values temporarily. Uses about 3 gas
Storage: Uses Gas to store permanently. Uses 2900 - 20000 gas.
Transient Storage: Storage that is cleared after a transaction
Note: There are no registers in the EVM
Link to this headingOpcodes
Link to this headingVariables
Solidity packs smaller variables into the same slot. This makes the gas cheaper because each load on the same slot after the first is about 20x cheaper.
Warning: Variables are stored in indexes according to their declaration order. Reordering variables will change the order of the variables. This may mess up upgradeable contracts
Link to this headingFunctions
Internal Calls are just jumps; they are not CALL operations. That is only for other contracts