As I understand EVM operates blocks of 256 bits. So uint256
is natural size for in memory calculations.
But I can't find in the documentation how it's applied to transactions and for storage.
I mean, is there any benefits of using:
function x(uint64 a, uint64 b)
instead of:
function x(uint a, uint b)
How much first transaction will take, and seconds? both will use 512 bits for data? or first 128 bits, second 512? maybe first will be 256 bit, as a minimal block length?
Same question for structs used in mapping values, say:
struct something {
uint8 x, uint64 y
}
compared to:
struct something {
uint x, uint y
}
Is there any storage optimization that EVM can use for the first struct?