Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B6372200CD7 for ; Tue, 1 Aug 2017 20:49:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B4DB1167B3D; Tue, 1 Aug 2017 18:49:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 05DED167B3C for ; Tue, 1 Aug 2017 20:49:00 +0200 (CEST) Received: (qmail 73088 invoked by uid 500); 1 Aug 2017 18:49:00 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 73077 invoked by uid 99); 1 Aug 2017 18:49:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 18:48:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 71A3DC14DA for ; Tue, 1 Aug 2017 18:48:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Dks5yZ18JefM for ; Tue, 1 Aug 2017 18:48:50 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 978AB5F5B3 for ; Tue, 1 Aug 2017 18:48:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v71ImldY008599; Tue, 1 Aug 2017 18:48:47 GMT Message-Id: <201708011848.v71ImldY008599@ip-10-146-233-104.ec2.internal> Date: Tue, 1 Aug 2017 18:48:47 +0000 From: "Tim Armstrong (Code Review)" To: Taras Bobrovytsky , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dan Hecht , Michael Ho , Zach Amsden Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4939=2C_IMPALA-4939=3A_Decimal_V2_multiplication=0A?= X-Gerrit-Change-Id: I37ad6232d7953bd75c18dc86e665b2b501a1ebe1 X-Gerrit-ChangeURL: X-Gerrit-Commit: 7c57ea4558a507e55ae3eb8eb191559033aaf815 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Tue, 01 Aug 2017 18:49:01 -0000 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 Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Taras Bobrovytsky Gerrit-Reviewer: Tim Armstrong Gerrit-Reviewer: Zach Amsden Gerrit-HasComments: Yes