Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eval cond perf #6859

Merged
merged 10 commits into from
Oct 26, 2021
Merged

Eval cond perf #6859

merged 10 commits into from
Oct 26, 2021

Commits on Sep 20, 2021

  1. Early exit

    Forgind committed Sep 20, 2021
    Configuration menu
    Copy the full SHA
    e02b3d9 View commit details
    Browse the repository at this point in the history
  2. Prevent double computation

    When calculating a value to see if we can do a type of comparison, store
    that value so we don't have to calculate it again. Use Try*Evaluate
    instead of Can*Evaluate and *Evaluate.
    Forgind committed Sep 20, 2021
    Configuration menu
    Copy the full SHA
    64354ff View commit details
    Browse the repository at this point in the history
  3. Use search for @

    Forgind committed Sep 20, 2021
    Configuration menu
    Copy the full SHA
    762ac1d View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2021

  1. Fix incorrect bool check

    Forgind committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    f9456c4 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2021

  1. Throw error

    Forgind committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    16a30b3 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. Replace Can*Evaluate and *Evaluate with Try*Evaluate

    Removes all *Evaluate and Can*Evaluate except in OperatorExpressionNodes, for which CanBoolEvaluate always returns true, so using a simple BoolEvaluate makes sense.
    
    Note that for the NumericComparisonExpressionNode, we could save a tiny amount of time by only calling TryEvaluate when it's actually used (and using if/else as before), but that would since something can be both a number and a version, that would mean we would have to check both regardless of what we had previously found, which means it would be noticeably messier for (probably) very little perf gain, so I opted against that. Switch statements are so pretty 🙂
    Forgind committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    6e4c0d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2aac6e2 View commit details
    Browse the repository at this point in the history
  3. Switch switch to tuple

    Apparently that's the best supported way
    Forgind committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    0134385 View commit details
    Browse the repository at this point in the history
  4. Switch order of check

    I tested once with and once without this change, and with this change, Evaluate was 3% faster...that sounds noisy, but I'll still take it.
    Forgind committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    625fd3f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    62760c1 View commit details
    Browse the repository at this point in the history