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;
|
|
|
|
}
|
|
|
|
// ----
|
|
|
|
// set(uint256): 1, 2 -> true
|
2023-08-04 10:27:18 +00:00
|
|
|
// gas irOptimized: 110558
|
2023-04-26 11:03:17 +00:00
|
|
|
// gas legacy: 111312
|
2023-08-04 15:31:39 +00:00
|
|
|
// gas legacyOptimized: 110741
|
2020-11-12 14:29:08 +00:00
|
|
|
// set(uint256): 2, 2, 3, 4, 5 -> true
|
2023-08-04 10:27:18 +00:00
|
|
|
// gas irOptimized: 177509
|
2023-04-26 11:03:17 +00:00
|
|
|
// gas legacy: 178314
|
2023-08-04 15:31:39 +00:00
|
|
|
// gas legacyOptimized: 177716
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 0
|
2020-11-12 14:29:08 +00:00
|
|
|
// copy(uint256,uint256): 1, 2 -> true
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 0
|
2020-11-12 14:29:08 +00:00
|
|
|
// copy(uint256,uint256): 99, 1 -> true
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 0
|
2020-11-12 14:29:08 +00:00
|
|
|
// copy(uint256,uint256): 99, 2 -> true
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 1
|