You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2020/10/14 16:25:00 UTC

[jira] [Commented] (ARROW-10304) [C++][Compute] Optimize variance kernel for integers

    [ https://issues.apache.org/jira/browse/ARROW-10304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17214036#comment-17214036 ] 

Antoine Pitrou commented on ARROW-10304:
----------------------------------------

For the record, the slowdown seems mostly due to int->double conversion. That doesn't change the overall result, though :-)

> [C++][Compute] Optimize variance kernel for integers
> ----------------------------------------------------
>
>                 Key: ARROW-10304
>                 URL: https://issues.apache.org/jira/browse/ARROW-10304
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Yibo Cai
>            Assignee: Yibo Cai
>            Priority: Major
>             Fix For: 3.0.0
>
>
> Current variance kernel converts all data type to `double` before calculation. It's sub-optimal for integers. Integer arithmetic is much faster than floating points, e.g., summation is 4x faster [1].
> A quick test for calculating int32 variance shows up to 3x performance gain. Another benefit is that integer arithmetic is accurate.
> [1] https://quick-bench.com/q/_Sz-Peq1MNWYwZYrTtQDx3GI7lQ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)