Jim Apple has posted comments on this change. Change subject: IMPALA-2809: improve ByteSwap with builtin function or SSE or AVX2 ......................................................................
Patch Set 3: (5 comments) http://gerrit.cloudera.org:8080/#/c/3081/3/be/src/benchmarks/bswap-benchmark.cc File be/src/benchmarks/bswap-benchmark.cc: Line 35: // Impala 317.2 1X > This benchmark is previously written by Zuo Wang. His idea is demonstrating Please fix them in the code so future readers will understand. Line 156: if (num_bytes == 4) { > Zuo Wang's idea is implementing a finer-grain level benchmark here. For exa I think more than comments will be necessary. Can you reduce the repetition by refactoring? http://gerrit.cloudera.org:8080/#/c/3081/3/be/src/util/bit-util.inline.h File be/src/util/bit-util.inline.h: Line 140: const __m128i mask = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, > I am afraid I can't do this for the initializer _mm_set_epi8/_mm256_set_epi It might, but it also might create a conditional at the beginning of the function. You might be able to use macros to make this a global that is conditionally compiled. Line 168: __int128_t part1 = *reinterpret_cast<__int128_t*>(dst); > Done This doesn't look done. Did you forget to upload the new version? Line 189: if(len >= 32){ > The AVX routine only suits for data length >= 256bit. And the SSE routine o I'm not sure I agree with you. It checks the lengthand calls ByteSwapScalar for the remainder, right? -- 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
