I'm trying to understand the breakdown of the storage costs for smart contracts. My understanding is that a smart contract has some 'code' which is immutable, and some 'storage' which is mutable. Or in other words there is the storage part of the contract can be updated by future operations, whereas the contract code cannot be.
For example, if I store a variable of length 4 bytes in the storage part, would that have the same cost as the contract 'code' having a hard-coded variable of 4 bytes?
If not, is there any intuition or ballpark estimate of what the relative costs might be? Does it depend on how the storage is used in the code?