Jim Apple has posted comments on this change.

Change subject: IMPALA-2809: Improve ByteSwap with builtin function or SSE or 
AVX2.
......................................................................


Patch Set 11:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/3081/11/be/src/benchmarks/bswap-benchmark.cc
File be/src/benchmarks/bswap-benchmark.cc:

Line 49: //                           SIMD               57.73               
2.18X
> Since SIMD is the direct caller of the new BitUtil::ByteSwap, which has a a
I am surprised by this. Is a single branch making this code 20x-40x slower?


Line 222:         MACRO_TEST_FBS_CASE(8, 5)
> Hi Jim. I am afraid this is not such case. The code above essentially is a 
remove the switch; instead:

    for (int i = 5; i <= 8; ++i) {
      if (data->FIXED_LEN_SIZE == i) {
        for (int j = 0; j < data->num_values; ++j) {
          impala::ByteSwapScalar...
        }
      }
    }

or do you even need the conditionals:

    else if (NUM_BYTES == 8 && data->FIXED_LEN_SIZE > 4 && data->FIXED_LEN_SIZE 
<= 8) {
      for (int j = 0; j < data->num_values; ++j) {
        impala::ByteSwapScalar...
      }
    }


Line 260: /// FIXED_LEN_SIZE = 4: Decimal4Value, size of array element is 8x4 = 
32bit
> Fixed in the new version
You've explain what FIXED_LEN_SIZE is, but I still don't know why we would do 
multiple passes.


-- 
To view, visit http://gerrit.cloudera.org:8080/3081
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I392ed5a8d5683f30f161282c228c1aedd7b648c1
Gerrit-PatchSet: 11
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Youwei Wang <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Mostafa Mokhtar <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Youwei Wang <[email protected]>
Gerrit-HasComments: Yes

Reply via email to