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
WindowTransform decrease amount of virtual function calls #56120
WindowTransform decrease amount of virtual function calls #56120
Conversation
Prepare data:
Before:
After:
Before:
After:
|
This is an automated comment for commit e533abe with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
4f448c8
to
f8e209e
Compare
/// We should use insertMergeResultInto to insert result into ColumnAggregateFunction | ||
/// correctly if result contains AggregateFunction's states | ||
a->insertMergeResultInto(buf, *result_column, arena.get()); | ||
if (ws.is_aggregate_function_state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess a similar improvement might be possible in other places where insertMergeResultInto
is called in a non constexpr environment right? I see FunctionInitializeAggregation and FunctionArrayReduce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a commit improving:
- FunctionInitializeAggregation ->
Select initializeAggregation('uniqExact', number) from numbers(100_000_000) settings max_threads=1 format Null;
around 20% faster - ArrayReduce: Less improvement, around 10% on a query like:
Select arrayReduce('sum', a) from a settings max_threads=1 format Null;
@kitaisreal WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, make sense. We need to merge this.
|
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
WindowTransform decrease amount of virtual function calls.