impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) Use more efficient gutil implementation of Log2Ceiling
Date Mon, 11 Apr 2016 21:21:24 GMT
Hello Dan Hecht,

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

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

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

Change subject: Use more efficient gutil implementation of Log2Ceiling
......................................................................

Use more efficient gutil implementation of Log2Ceiling

This was used in FreePool::Allocate, which is called a lot in some
workloads, so may have some perf impact. I was looking at using this
function for an allocator for the new buffer pool and it makes the
allocator code simpler if I can call this function freely without
perf concerns.

Modified gutil's implementation slightly so that gcc optimises it to
the following branch-free code:

.LHOTB8:
        .align 2
        .p2align 4,,15
        .globl  _ZN4Bits20Log2CeilingNonZero64Ey
        .type   _ZN4Bits20Log2CeilingNonZero64Ey, @function
_ZN4Bits20Log2CeilingNonZero64Ey:
.LFB1797:
        .loc 1 90 0
        .cfi_startproc
.LVL40:
.LBB33:
        .loc 1 92 0
        leaq    -1(%rdi), %rdx  #, D.40305
.LBB34:
.LBB35:
        .loc 2 155 0
        bsrq    %rdi, %rax      # n, tmp89
.LVL41:
.LBE35:
.LBE34:
        .loc 1 92 0
        andq    %rdx, %rdi      # D.40305, D.40305
.LVL42:
        .loc 1 95 0
        cmpq    $1, %rdi        #, D.40305
        sbbl    $-1, %eax       #, D.40304
.LVL43:
.LBE33:
        .loc 1 96 0
        ret
        .cfi_endproc

Change-Id: Ifbffb49b5c86394e5a9ccd711132543856321be0
---
M be/src/exec/hdfs-parquet-scanner.cc
M be/src/gutil/bits.cc
M be/src/gutil/bits.h
M be/src/runtime/disk-io-mgr.cc
M be/src/runtime/free-pool.h
M be/src/runtime/runtime-filter.cc
M be/src/util/bit-util-test.cc
M be/src/util/bit-util.h
M be/src/util/bloom-filter.h
M be/src/util/dict-encoding.h
10 files changed, 65 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/35/2735/2
-- 
To view, visit http://gerrit.cloudera.org:8080/2735
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifbffb49b5c86394e5a9ccd711132543856321be0
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Skye Wanderman-Milne <skye@cloudera.com>

Mime
View raw message