Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4939, IMPALA-4939: Decimal V2 multiplication
......................................................................


Patch Set 4:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/7438/4//COMMIT_MSG
Commit Message:

Line 7: IMPALA-4939, IMPALA-4939: Decimal V2 multiplication
The same JIRA is listed twice.


Line 75: DECIMAL_V2 disabled: 2.65s
This is scary and I don't think we should consider merging this until it's 
fixed (or we have a strong reason why the regression is unavoidable and 
justified). Do we understand why the int256_t is so much slower?


http://gerrit.cloudera.org:8080/#/c/7438/1/be/src/runtime/decimal-value.inline.h
File be/src/runtime/decimal-value.inline.h:

Line 301:       // The following is frought with apparent difficulty, as there 
is only 1 bit
> Added a TODO.
It seems most efficient development-wise if we give this a try now while we're 
working on and benchmarking this code instead of leaving a TODO.

This could be a big win - I know the div here is a big contributor to runtime 
for some queries, e.g. TPC-H Q1


http://gerrit.cloudera.org:8080/#/c/7438/1/be/src/util/bit-util.h
File be/src/util/bit-util.h:

Line 65:     return value < 0 ? -1 : 1;
> I included the benchmark result in the commit message.
Does it compile to the same assembly (or better assembly) as before? If it's 
adding a branch, the benchmark may be misleading since the worst case would be 
a 50/50 mix of positive and negative types, leading to branch mispredicts.

Another option is to keep the existing implementation and specialise the 
template for int256.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I37ad6232d7953bd75c18dc86e665b2b501a1ebe1
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <tbobrovyt...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zams...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to