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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • 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

              yibocai Yibo Cai
              yibocai Yibo Cai
              Votes:
              0 Vote for this issue
              Watchers:
              3 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