I have this contract with this functions, why each use different gas amount?
pragma solidity 0.4.24;
contract Foo {
//transaction cost: 21471 gas
//execution cost: 199 gas
//total cost: 21670 gas
function withoutNewS() external {
uint256[3] storage data;
}
//transaction cost: 21427 gas
//execution cost: 155 gas
//total cost: 21582 gas
function withoutNew() external {
uint256[3] data;
}
//transaction cost: 21533 gas
//execution cost: 261 gas
//total cost: 21794 gas
function withoutNewM() external {
uint256[3] memory data;
}
//transaction cost: 21607 gas
//execution cost: 335 gas
//total cost: 21942 gas
function withNewM() external {
uint256[] memory data = new uint256;
}
}