Tim Armstrong has posted comments on this change. Change subject: IMPALA-2809: improve ByteSwap with builtin function or SSE or AVX2 ......................................................................
Patch Set 3: (9 comments) http://gerrit.cloudera.org:8080/#/c/3081/3/be/src/benchmarks/bswap-benchmark.cc File be/src/benchmarks/bswap-benchmark.cc: Line 121: vector<Decimal4Value> d4_values; > What to decimals have to do with byteswapping? Parquet encodes decimals in big-endian order so we need to byte-swap them. Line 151: inline void ByteSwapAVX2(void* dest, const void* source, int len) { > It would be good to benchmark the function actually used for byteswapping, Agreed, we should benchmark the actual implementations in bit-util.h, including any if statements used to select the implementation. http://gerrit.cloudera.org:8080/#/c/3081/3/be/src/util/bit-util.inline.h File be/src/util/bit-util.inline.h: Line 168: __int128_t Than this be uint128_t? Line 185: ByteSwapScalar(dst, src, i); Is there a benefit to using ByteSwapSSE_Unit here if there is >= 16 left? Line 188: tUtil::ByteSwap(void* dest, const void* source, int len){ : if(len >= 32){ Do we need the len check? What if we just call AVX/SSE always? Space between ) and { Line 191: if ( CpuInfo::IsSupported(CpuInfo::AVX2) ){ Space between ) and { Line 193: } else if( CpuInfo::IsSupported(CpuInfo::SSE4_2) ){ > LIKELY(CpuInfo:: .... Fix spaces: else if (CpuInfo::IsSupported(CpuInfo::SSE4_2)) { Line 198: } else if( len >= 16){ Fix spaces Line 200: if( CpuInfo::IsSupported(CpuInfo::SSE4_2) ){ Fix spaces -- 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: 3 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
