You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/08 06:23:13 UTC

[GitHub] [arrow] cyb70289 commented on pull request #10679: ARROW-13170 [C++] Reducing branching in compute/kernels/vector_selection.cc

cyb70289 commented on pull request #10679:
URL: https://github.com/apache/arrow/pull/10679#issuecomment-876164351


   Thanks @nirandaperera for doing this!
   
   There are big improvement for 50% selection case, when cpu branch prediction works worst. This is great.
   I'm a bit concerned about the _big drop of 1% selection_ case (looks useful in real world IMO).
   
   I tested on my xeon gold 5218 server and got similar result as yours. To ease debugging, I only listed FilterInt64FilterNoNulls tests.
   (NOTE: FilterRecordBatchXXX/100/X tests are pretty noisy per my experience, you may ignore them).
   
   ```
   $ archery benchmark diff --suite-filter=arrow-compute-vector-selection-benchmark \
                            --benchmark-filter="^FilterInt64FilterNoNulls" \
                            --cc=clang-10 --cxx=clang++-10
   
   -----------------------------------------------------------------------------------------------------------------
   Non-regressions: (11)
   -----------------------------------------------------------------------------------------------------------------
                             benchmark       baseline      contender  change 
   // XXX: big improvement for selection = 50%
    FilterInt64FilterNoNulls/1048576/4  1.033 GiB/sec  2.123 GiB/sec   105.545 {'data null%': 0.1,  'select%': 50.0}
    FilterInt64FilterNoNulls/1048576/7  1.031 GiB/sec  1.921 GiB/sec    86.369 {'data null%': 1.0,  'select%': 50.0}
   FilterInt64FilterNoNulls/1048576/10  1.055 GiB/sec  1.778 GiB/sec    68.505 {'data null%': 10.0, 'select%': 50.0}
   FilterInt64FilterNoNulls/1048576/13  1.054 GiB/sec  1.772 GiB/sec    68.161 {'data null%': 90.0, 'select%': 50.0}
   
   // XXX: no difference for selection = 99.9%
    FilterInt64FilterNoNulls/1048576/9  5.495 GiB/sec  5.744 GiB/sec     4.530 {'data null%': 10.0, 'select%': 99.9}
   FilterInt64FilterNoNulls/1048576/12  5.572 GiB/sec  5.693 GiB/sec     2.176 {'data null%': 90.0, 'select%': 99.9}
    FilterInt64FilterNoNulls/1048576/3  8.387 GiB/sec  8.431 GiB/sec     0.521 {'data null%': 0.1,  'select%': 99.9}
    FilterInt64FilterNoNulls/1048576/0 12.422 GiB/sec 12.417 GiB/sec    -0.040 {'data null%': 0.0,  'select%': 99.9}
    FilterInt64FilterNoNulls/1048576/6  6.787 GiB/sec  6.717 GiB/sec    -1.030 {'data null%': 1.0,  'select%': 99.9}
   
   // XXX: no difference if no nulls, regardless selection
    FilterInt64FilterNoNulls/1048576/1  1.927 GiB/sec  1.955 GiB/sec     1.470 {'data null%': 0.0,  'select%': 50.0}
    FilterInt64FilterNoNulls/1048576/2 31.374 GiB/sec 31.808 GiB/sec     1.383 {'data null%': 0.0,  'select%': 1.0}
   
   -----------------------------------------------------------------------------------------------------------------
   Regressions: (4)
   -----------------------------------------------------------------------------------------------------------------
                             benchmark      baseline     contender  change
   // XXX: big regression for selection = 1%
    FilterInt64FilterNoNulls/1048576/5 6.755 GiB/sec 3.766 GiB/sec   -44.239 {'data null%': 0.1,  'select%': 1.0}
    FilterInt64FilterNoNulls/1048576/8 6.766 GiB/sec 3.500 GiB/sec   -48.265 {'data null%': 1.0,  'select%': 1.0}
   FilterInt64FilterNoNulls/1048576/14 7.182 GiB/sec 3.271 GiB/sec   -54.453 {'data null%': 90.0, 'select%': 1.0}
   FilterInt64FilterNoNulls/1048576/11 7.183 GiB/sec 3.271 GiB/sec   -54.470 {'data null%': 10.0, 'select%': 1.0}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org