Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Do gas fees for dict operations depend on the dict size?

If there are two dicts and one of them is bigger than other, would the operations like insert require more gas for the bigger one, or would the gas fees be the same for both?

This question was imported from Telegram Chat: https://t.me/tondev/127861

Posted one year ago
Votes Newest


Yes, gas consumption does increase with the size of the dictionary. This is due to how the dictionary is packed.

Specifically, it's packaged as a compressed prefix tree into a cell tree. When you perform a read operation, all the cells on the path to your value are read, with each cell reading costing 25/100 of the gas.

Thus, larger dictionaries, which have more cells to read, will consume more gas.

Posted one year ago
2 Answers
one year ago
one year ago