-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-9699: [C++][Compute] Optimize mode kernel for small integer types #7963
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
Conversation
|
Removed unrelated tests for clarity. |
pitrou
left a comment
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.
Thank you for doing this.
A more sophisticated optimization for integer arrays would be to find the min/max, and use a direct access table if max-min is small enough (e.g. < 4096). But that can be left for another JIRA.
For small integers(bool, int8, uint8), instead of general hash table, using a value indexed array improves performance about 2x ~ 6x. Get another 15% improvement by reading array raw_values[] directly.
pitrou
left a comment
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.
+1, thank you @cyb70289 !
For small integers(bool, int8, uint8), instead of general hash table,
using a value indexed array improves performance about 2x ~ 6x.