Tim Armstrong has posted comments on this change. Change subject: IMPALA-4939, IMPALA-4940: Decimal V2 multiplication ......................................................................
Patch Set 5: (2 comments) http://gerrit.cloudera.org:8080/#/c/7438/4//COMMIT_MSG Commit Message: Line 75: DECIMAL_V2 disabled: 4.25s > Running perf top showed that most of the time is spent in ScaleDownAndRound Yeah that seems likely - the faster everything else becomes the more this would be a bottleneck. I don't see an obvious way to speed this up (except maybe avoiding the redundant divide/mod calls?) and I guess it only makes a difference if a lot of expressions are overflowing. Maybe someone with deeper knowledge of decimal might see a way to improve it. http://gerrit.cloudera.org:8080/#/c/7438/4/be/src/runtime/decimal-value.inline.h File be/src/runtime/decimal-value.inline.h: Line 204: if (round) { It's unfortunate that we're not computing the quotient and remainder at the same time. It looks like boost eventually calls divide_unsigned_helper in multiprecision/cpp_int/divide.hpp with the same arguments in both cases but throws away either the result or remainder. If avoiding two divide calls would help performance we could consider calling divide_unsigned_helper() directly. -- 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: 5 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Taras Bobrovytsky <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Taras Bobrovytsky <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Zach Amsden <[email protected]> Gerrit-HasComments: Yes
