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

Improve grouping performance via better vectorization in accumulate functions #7066

Open
alamb opened this issue Jul 24, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Jul 24, 2023

Is your feature request related to a problem or challenge?

The inner loop of many accumulators, such as Avg, is implemented in NullState::accumulate (source link), which has specializations for nulls and filters.

I think it would be possible to help the compiler make even more efficient code / vectorize the inner loops of the accumulators.

Describe the solution you'd like

Study and optimize the implementation of NullState::accumulate and related functions and make them faster

Specifically, I think being clever about null mask iteration or updating null state more efficiently, we could perhaps make the aggregates faster

Benchmarks to drive some of this work:

benchmarks/bench.sh run tpch_mem
benchmarks/bench.sh run clickbench_1

Describe alternatives you've considered

Here is one approach (that didn't seem to make things better enough): #6954

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant