I am using string
as a key on mapping
data structure.
[Q] While we are use mapping
, when the length of the key string increases, does it also increase the gas usage?
mapping(string => int) map;
contract.array("mykey"); //short key length.
contract.array("mykey_mykey_mykey_mykey_mykey_mykey"); //longer key length is used.
function array(string key){
map[key] = 10;
}
Thank you for your valuable time and help.