impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) IMPALA-3115: Hoist some variables out of loops in cross-compiled code.
Date Wed, 20 Apr 2016 22:58:12 GMT
Hello Tim Armstrong,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/2661

to look at the new patch set (#8).

Change subject: IMPALA-3115: Hoist some variables out of loops in cross-compiled code.
......................................................................

IMPALA-3115: Hoist some variables out of loops in cross-compiled code.

This change adds the compiler hint __restrict__ to indicate that input
arguments of some cross-compiled functions have no aliases. This
allows the compiler to hoist some variables such as loop bounds
(e.g out_batch->num_rows()) out of the loop. In addition, this change
introduces an iterator interface for RowBatch to avoid the multiplication
inside loops when RowBatch::GetRow() is called. Apparently, specifying the
no alias hint isn't always sufficient for clang to convert multiplication
to addition in the loop. Hoisting of variables was confirmed to occur via
manual inspection of the generated IR.

With this change, some queries in targeted perf such as PERF_AGG-Q4 has
more than 10% improvement on average. TARGETED_PERF(15) and TPCH_NESTED(300)
shows about 1% improvement.

Change-Id: Ic7152b1fb094b3c3574d203e3774f4297f2225dc
---
M be/src/exec/hash-table.cc
M be/src/exec/hash-table.h
M be/src/exec/hash-table.inline.h
M be/src/exec/partitioned-aggregation-node-ir.cc
M be/src/exec/partitioned-aggregation-node.cc
M be/src/exec/partitioned-aggregation-node.h
M be/src/exec/partitioned-hash-join-node-ir.cc
M be/src/exec/partitioned-hash-join-node.cc
M be/src/exec/partitioned-hash-join-node.h
M be/src/runtime/row-batch.h
M be/src/runtime/tuple-row.h
11 files changed, 181 insertions(+), 117 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/61/2661/8
-- 
To view, visit http://gerrit.cloudera.org:8080/2661
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic7152b1fb094b3c3574d203e3774f4297f2225dc
Gerrit-PatchSet: 8
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>

Mime
View raw message