Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10304

[C++][Compute] Optimize variance kernel for integers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: C++

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yibo Yibo Cai
                Reporter:
                yibo Yibo Cai
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m