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

[C++] Unroll the loop manually for CountSetBits

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • C++

    Description

      The tight loop below can get better performance if unroll manually to indicate the compiler generating better parallel instructions.

      for (auto iter = u64_data; iter < end; ++iter)

      { count += BitUtil::PopCount(*iter); }

      Attachments

        Issue Links

          Activity

            People

              frank.du Frank Du
              frank.du Frank Du
              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 - 1.5h
                  1.5h