Return-Path: X-Original-To: apmail-impala-dev-archive@minotaur.apache.org Delivered-To: apmail-impala-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2482B19739 for ; Mon, 11 Apr 2016 21:21:30 +0000 (UTC) Received: (qmail 4685 invoked by uid 500); 11 Apr 2016 21:21:30 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 4646 invoked by uid 500); 11 Apr 2016 21:21:30 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 4634 invoked by uid 99); 11 Apr 2016 21:21:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Apr 2016 21:21:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4970C180227 for ; Mon, 11 Apr 2016 21:21:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.462 X-Spam-Level: **** X-Spam-Status: No, score=4.462 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_SBL=4, URIBL_SBL_A=0.1] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id utsWFGAobleZ for ; Mon, 11 Apr 2016 21:21:27 +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 mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 232095F571 for ; Mon, 11 Apr 2016 21:21:27 +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 u3BLLQEo000805; Mon, 11 Apr 2016 21:21:26 GMT Message-Id: <201604112121.u3BLLQEo000805@ip-10-146-233-104.ec2.internal> Date: Mon, 11 Apr 2016 21:21:24 +0000 From: "Tim Armstrong (Code Review)" To: Dan Hecht , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Skye Wanderman-Milne Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_Use_more_efficient_gutil_implementation_of_Log2Ceiling=0A?= X-Gerrit-Change-Id: Ifbffb49b5c86394e5a9ccd711132543856321be0 X-Gerrit-ChangeURL: X-Gerrit-Commit: 966293bfe3114f057b0a726f94837bd48949370b 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.10-rc0 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 Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Skye Wanderman-Milne