Jim Apple has posted comments on this change.

Change subject: IMPALA-2809: Improve scalar ByteSwap().
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3033/3/be/src/util/bit-util.inline.h
File be/src/util/bit-util.inline.h:

Line 122:         dst[i] = src[len - i - 1];
Why not memcpy? Testing with gcc.godbolt.org, I see what looks like fast code 
for

    switch(len) {
      case 1: memcpy(dest, source, len); break;
      case 2: memcpy(dest, source, len); break;
      ...
      case 16: memcpy(dest, source, len); break;
      default: memcpy(dest, source, len); break;
    }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4f462e6bdb022db46b48889a6a7426120a80d9b4
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Alex Behm <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Taras Bobrovytsky <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to