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
Answered
How to optimize gas usage in a smart contract?

It's good when a smart contract needs as little gas as possible for a specific action. So a developer might want to optimize the code, making it use less gas. But how to do it? Of course, it depends on a specific case, so there is no universal answer. But maybe there are some well-known best practices that are good to begin with? Are there some posts on the topic of gas optimization in TON?


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

  
  
Posted 6 months ago
Votes Newest

Answers


There is a page on ton.org that presents some best practices for optimizing gas:

https://docs.ton.org/develop/howto/fees-low-level

  
  
Posted 5 months ago
9K Views
1 Answer
6 months ago
5 months ago
Tags