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 17406200C8F for ; Fri, 9 Jun 2017 23:51:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 15A45160BCA; Fri, 9 Jun 2017 21:51:29 +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 5CAB4160BB6 for ; Fri, 9 Jun 2017 23:51:28 +0200 (CEST) Received: (qmail 64614 invoked by uid 500); 9 Jun 2017 21:51:27 -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 64602 invoked by uid 99); 9 Jun 2017 21:51:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2017 21:51:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D5702C090E for ; Fri, 9 Jun 2017 21:51:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id pacn7U_oE8dA for ; Fri, 9 Jun 2017 21:51:23 +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-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 176CE5FC1C for ; Fri, 9 Jun 2017 21:51:22 +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 v59LpMO6024966; Fri, 9 Jun 2017 21:51:22 GMT Message-Id: <201706092151.v59LpMO6024966@ip-10-146-233-104.ec2.internal> Date: Fri, 9 Jun 2017 21:51:21 +0000 From: "Michael Ho (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: kwho@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5479=3A_Propagate_the_argument_type_in_RawValue=3A=3ACompare=28=29=0A?= X-Gerrit-Change-Id: I10b5b284e3da03024476a9620a12d6e7fbf08b3c X-Gerrit-ChangeURL: X-Gerrit-Commit: 816917d5ad4e61da97ba1654535699a2481aea8d 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: Fri, 09 Jun 2017 21:51:29 -0000 Hello Tim Armstrong, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/7140 to look at the new patch set (#2). Change subject: IMPALA-5479: Propagate the argument type in RawValue::Compare() ...................................................................... IMPALA-5479: Propagate the argument type in RawValue::Compare() CodegenAnyVal::Compare() generates code which calls the cross compiled version of RawValue::Compare() without propagating the type information into RawValue::Compare(). As a result, the generated code of RawValue::Compare() is not any more efficient than the interpreted version as we still have the big switch statement in it. This change creates a global constant for the argument 'type' passed to RawValue::Compare(). By inlining the call to RawValue::Compare(), LLVM was able to constant propagate the type and eliminate the dead code for non-target types. With this change, a query with top-n improves by 12% on average: select l_orderkey, l_partkey, l_suppkey from tpch50_parquet.lineitem order by l_orderkey, l_partkey, l_suppkey limit 10000; 4.49s -> 3.95s This change also adds the ALWAYS_INLINE attribute to RuntimeFilter::Eval() as it's needed to propagate the type after a recent change to not put ALWAYS_INLINE attribute on all cross-compiled functions. Change-Id: I10b5b284e3da03024476a9620a12d6e7fbf08b3c --- M be/src/codegen/codegen-anyval.cc M be/src/runtime/raw-value-ir.cc M be/src/runtime/raw-value.h M be/src/runtime/runtime-filter-ir.cc M be/src/runtime/runtime-filter.h 5 files changed, 21 insertions(+), 11 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/40/7140/2 -- To view, visit http://gerrit.cloudera.org:8080/7140 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I10b5b284e3da03024476a9620a12d6e7fbf08b3c Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Ho Gerrit-Reviewer: Tim Armstrong