Internal Jenkins has submitted this change and it was merged.

Change subject: IMPALA-3375: Improve TopN performance with a trivial Compare 
object.
......................................................................


IMPALA-3375: Improve TopN performance with a trivial Compare object.

The C++ standard requires that priority_queue operations behave as
wrappers to {push,pop,make,sort}_heap, which take their comparator
object by value. This is expensive for objects like
TupleRowComparator.

This patch creates a wrapper type this is trivial to copy. It also
renames the operator()s of stateful comparator types to prevent their
accidental use in STL functions that take comparators by value.

This speeds up primitive_topn_bigint by 39% locally with scale factor
13 and 31% on the 16-node with scale factor 300. It speeds up
primitive_top-n_all by 13% locally and 7% on the 16-node.

Change-Id: I24755227b5bbbca6ad7c7d31d9bb8e132ca89e11
Reviewed-on: http://gerrit.cloudera.org:8080/2936
Reviewed-by: Jim Apple <[email protected]>
Tested-by: Internal Jenkins
---
M be/src/exec/topn-node.cc
M be/src/exec/topn-node.h
M be/src/runtime/sorted-run-merger.cc
M be/src/runtime/sorted-run-merger.h
M be/src/runtime/sorter.cc
M be/src/service/impala-server-callbacks.cc
M be/src/service/impala-server.cc
M be/src/service/impala-server.h
M be/src/util/tuple-row-compare.h
9 files changed, 61 insertions(+), 37 deletions(-)

Approvals:
  Jim Apple: Looks good to me, approved
  Internal Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24755227b5bbbca6ad7c7d31d9bb8e132ca89e11
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>

Reply via email to