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
Unanswered
Does FunC have optimizations for skipping the condition evaluation?

Suppose we check for two conditions at the same time: if( (a == b) & (b == c) ).

If a is not equal to b, that makes the first condition false. And that means the whole expression is false regardless of the second condition. So while executing this code, if we find out that a != b, we could hypothetically skip the evaluation of the second condition and save some computer time (and gas fee).

Some programming languages check both conditions regardless of the outcome of the first check, and some have such an optimization that lets them skip the unnecessary checking. How does FunC behave in such situations?


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

  
  
Posted one year ago
Votes Newest

Answers