perf(cubesql): More complete usage of member_name_to_expr caching #8497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes column_name_to_member_vec do caching, removes some of its calls. But also, we replace a bunch of usage of
find_member_by_alias_immutably
with the mutable, caching version.Most benchmarks do the same or better.
long_simple_in_number_expr_1k
is one which gets worse, at +9%. A few of the numbers:The main source of worse performance would come from pre-emptively copying out and cloning vectors that were previously iterated in-place to avoid holding multiple mutable references to the EGraph. We could probably deal with that efficiently by using RefCell in the member_name_to_expr field, but we don't do that here.
Check List