-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] Use nibble mask in filter_range for ARM #44194
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
78aaf7c to
597eebd
Compare
dirtysalt
approved these changes
Apr 16, 2024
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
kangkaisen
approved these changes
Apr 17, 2024
stdpain
approved these changes
Apr 17, 2024
leiyang0324
pushed a commit
to leiyang0324/starrocks
that referenced
this pull request
Apr 19, 2024
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
ZiheLiu
added a commit
to ZiheLiu/starrocks
that referenced
this pull request
Apr 25, 2024
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
|
@mergify backport branch-3.2 branch-3.3 |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Apr 26, 2024
Signed-off-by: zihe.liu <ziheliu1024@gmail.com> (cherry picked from commit 6326aa0)
mergify bot
pushed a commit
that referenced
this pull request
Apr 26, 2024
Signed-off-by: zihe.liu <ziheliu1024@gmail.com> (cherry picked from commit 6326aa0)
This was referenced Apr 26, 2024
wanpengfei-git
pushed a commit
that referenced
this pull request
Apr 26, 2024
… (#44818) Co-authored-by: zihe.liu <ziheliu1024@gmail.com>
kangkaisen
pushed a commit
that referenced
this pull request
Apr 26, 2024
… (#44819) Co-authored-by: zihe.liu <ziheliu1024@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why I'm doing:
Optimize
filter_rangefor ARM.Here is the CPU perf flame graph for the SSB 100GB Q07. The occupation of
FixedLengthColumnBase<int>::filter_rangeincreases from 11.35% on x86 to 19.27% on ARM.Q07 is special, because almost every chunk keeps several rows after filtering. Therefore, the third branch always hit by every chunk.
on ARM

on x86

What I'm doing:
Inspired by this article, we could get a nibble mask for the filter result, which is a 64-bit mask, each 4-bit represents a byte of the input.
And then we could use
x &= (x - 1)and__builtin_ctzllto iterate through bits to eliminateifbranch, which referred to as Kernighan's algorithm.Test
Enviroment
Test Result
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: