[
https://issues.apache.org/jira/browse/ARROW-9873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17185599#comment-17185599
]
Yibo Cai commented on ARROW-9873:
---------------------------------
Did some benchmarks on skylake, i7 and arm64 cpu with similar result: we can
get big performance improvement with this approach. *A possible threshold is
for arrays with at least 1024 elements, and with value range smaller than
16384.*
Below graph is tested on skylake. Y axis plots speed comparison of this
counting method .vs. hash table, above 1 means better. X axis is array size.
Difference lines means different value range. See [test
code|https://github.com/cyb70289/mytests/blob/master/cpp/mode-range.cc] for
details.
!mode-range-skylake.png!
> [C++][Compute] Improve mode kernel for intergers within limited value range
> ---------------------------------------------------------------------------
>
> Key: ARROW-9873
> URL: https://issues.apache.org/jira/browse/ARROW-9873
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Yibo Cai
> Assignee: Yibo Cai
> Priority: Major
> Attachments: mode-range-skylake.png
>
>
> It's possible to improve mode kernel performance for integers within limited
> value range by using a value indexed array instead of general hash table.
> Similar trick is used in sorting kernel ARROW-1571.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)