Todd Lipcon has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13591 )

Change subject: KUDU-2846: optimize predicate evaluation for primitives
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/13591/6//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/13591/6//COMMIT_MSG@8
PS6, Line 8:
           : This changes to an optimized unrolled-by-8 predicate evaluation for
           : primitive columns.
> Any reason to stop at 8 vs 16 or 32?
for AVX2 there aren't any parallel compare operations that can do more than 8 
lanes (there are operations for 8x16, 4x32, 2x64 on a 128-bit vector register, 
and 8x32 in a 256-bit register). There might be clever ways to get 16x8 to work 
for some operations but it wasn't obvious so I didn't explore it much. OK with 
committing this for now and coming back to further optimize later based on 
whether this still shows up in any profiles?


http://gerrit.cloudera.org:8080/#/c/13591/3/src/kudu/common/column_predicate-test.cc
File src/kudu/common/column_predicate-test.cc:

http://gerrit.cloudera.org:8080/#/c/13591/3/src/kudu/common/column_predicate-test.cc@1538
PS3, Line 1538: pred.Evaluate(b, &selvec);
> Should probably check the final value of num_ret.
I just had this 'num_ret' bit to try to avoid the compiler completely 
optimizing out the loop, but I think now that I have CycleClock::Now() calls, 
and given Evaluate is not defined inline, it'll already ensure that the 
pred.Evaluate() function actually gets called. I'll just remove it.

Actually validating the result would add a fair bit of complexity to the test, 
considering we use random datasets. I think the AllTypesScanCorrectnessTest 
already has good coverage (as we saw by the wall of red tests in the first 
iteration here)


http://gerrit.cloudera.org:8080/#/c/13591/3/src/kudu/common/column_predicate.cc
File src/kudu/common/column_predicate.cc:

http://gerrit.cloudera.org:8080/#/c/13591/3/src/kudu/common/column_predicate.cc@654
PS3, Line 654: // For primitives, it's safe to evaluate a predicate even if the 
cell is
> :exploding_head:
you and UBSAN both


http://gerrit.cloudera.org:8080/#/c/13591/3/src/kudu/common/column_predicate.cc@686
PS3, Line 686:   return n_chunks * 8;
> nit: Could you doc the return value?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9dd062961a3cd2c892997d6aba12684e603628a1
Gerrit-Change-Number: 13591
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Comment-Date: Thu, 13 Jun 2019 15:41:04 +0000
Gerrit-HasComments: Yes

Reply via email to