2020-11-12 14:29:08 +00:00
|
|
|
contract c {
|
|
|
|
function set(uint key) public returns (bool) { data[key] = msg.data; return true; }
|
|
|
|
function copy(uint from, uint to) public returns (bool) { data[to] = data[from]; return true; }
|
|
|
|
mapping(uint => bytes) data;
|
|
|
|
}
|
2020-11-12 10:54:37 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-11-12 14:29:08 +00:00
|
|
|
// ----
|
|
|
|
// set(uint256): 1, 2 -> true
|
2021-04-08 12:57:18 +00:00
|
|
|
// gas irOptimized: 103240
|
2021-02-12 12:45:15 +00:00
|
|
|
// gas legacy: 103491
|
2021-03-11 11:17:50 +00:00
|
|
|
// gas legacyOptimized: 103136
|
2020-11-12 14:29:08 +00:00
|
|
|
// set(uint256): 2, 2, 3, 4, 5 -> true
|
2021-04-08 12:57:18 +00:00
|
|
|
// gas irOptimized: 163927
|
2021-02-12 12:45:15 +00:00
|
|
|
// gas legacy: 164121
|
2021-03-11 11:17:50 +00:00
|
|
|
// gas legacyOptimized: 163766
|
2020-11-12 14:29:08 +00:00
|
|
|
// storage: nonempty
|
|
|
|
// copy(uint256,uint256): 1, 2 -> true
|
|
|
|
// storage: nonempty
|
|
|
|
// copy(uint256,uint256): 99, 1 -> true
|
|
|
|
// storage: nonempty
|
|
|
|
// copy(uint256,uint256): 99, 2 -> true
|
|
|
|
// storage: empty
|