Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j8wgw-0002xQ-AH for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 01:49:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j8wgu-0003QT-Ub for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 01:49:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j8wgu-0003QM-LU for pgsql-hackers@lists.postgresql.org; Tue, 03 Mar 2020 01:49:48 +0000 Received: from mx0b-00296801.pphosted.com ([148.163.153.148]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j8wgq-0004Up-Qo for pgsql-hackers@postgresql.org; Tue, 03 Mar 2020 01:49:47 +0000 Received: from pps.filterd (m0114586.ppops.net [127.0.0.1]) by mx0b-00296801.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0231m9km023854 for ; Tue, 3 Mar 2020 01:49:41 GMT Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0b-00296801.pphosted.com with ESMTP id 2yfhcksxdp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 03 Mar 2020 01:49:41 +0000 Received: by mail-pj1-f69.google.com with SMTP id i3so738628pjx.8 for ; Mon, 02 Mar 2020 17:49:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=E4HVO3xYq0jFCrTImiWif0YbYw1xQY+T+hFUI/DuaZk=; b=uj/xH7lyzN8nNm2VAah/UlWQ4I2zqzII8lvfAx35u/pDqXzjEQtu2zEPmlnnbCJ/sG NTQFR/Ot4+/jCBD5Ld/Op/UXp8KAogsNmmD2chrsRXPleIcrFRIGqgh13ardf4GOILMx v8ySUd5hF/+/OOQ0s3+GNDm9binmBkyh3E2/m/4pMz0WSLYyKrYJ+IEs8JvIThl/YI6U 527QoZEBEO73JpGvG6AVq7qmPcu4LLAuiFTJlFtY7xI/m4xomK1uh3VQBlbQeZHuw/AC tAlNMPIb0L9aI9Os0G+SrnNdOzJ9/5GI56xgV0vk57DkPDFomtPLoWhw5KA77ssX5a5v trAw== X-Gm-Message-State: ANhLgQ03/08DQim8RtjfrilqEoZLGXjCMt00BC56BcXY5xl0zD9l+/B/ B+RzG3a/rgUdpLz5JYHJS6fw/kIh4TZoyn2NUezaDr2sDpPKjrS7/Nj6dc8Ym+u8fwPjscMjGtD Jgx2b+yP+VYuBHpK8KvAR1f3tLBaqAD6ZgB9iSr1Bjt+w2BItyw== X-Received: by 2002:a65:6901:: with SMTP id s1mr1685460pgq.446.1583200180658; Mon, 02 Mar 2020 17:49:40 -0800 (PST) X-Google-Smtp-Source: ADFU+vvR9qz0/5GyO1rifxbAquKNPcXAvq35DupjnBHplBI1CiW+qTfITFBDE5fy/X+FIcQ0oeSBsg== X-Received: by 2002:a65:6901:: with SMTP id s1mr1685448pgq.446.1583200180405; Mon, 02 Mar 2020 17:49:40 -0800 (PST) Received: from localhost (li1619-9.members.linode.com. [172.104.39.9]) by smtp.gmail.com with ESMTPSA id p3sm22579217pfg.184.2020.03.02.17.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 17:49:39 -0800 (PST) Date: Tue, 3 Mar 2020 09:49:35 +0800 From: Adam Lee To: Jeff Davis Cc: pgsql-hackers@postgresql.org, Peter Geoghegan , Heikki Linnakangas Subject: Re: Add LogicalTapeSetExtend() to logtape.c Message-ID: <20200303014935.GA1022@earth.local> References: <20200228061641.GA883@earth.local> <619e61919fd604c2caa629536ee87615b732e054.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <619e61919fd604c2caa629536ee87615b732e054.camel@j-davis.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-02_09:2020-03-02,2020-03-02 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 clxscore=1011 malwarescore=0 mlxlogscore=505 lowpriorityscore=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 mlxscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003030011 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Feb 28, 2020 at 12:38:55PM -0800, Jeff Davis wrote: > On Fri, 2020-02-28 at 14:16 +0800, Adam Lee wrote: > > I noticed another difference, I was using palloc0(), which could be > > one of the > > reason, but not sure. > > I changed the palloc0()'s in your code to plain palloc(), and it didn't > make any perceptible difference. Still slower than the version I posted > that keeps the flexible array. > > Did you compare all 3? Master, with your patch, and with my patch? I'd > like to see if you're seeing the same thing that I am. > > > Tested your hashagg-20200226.patch on my laptop(Apple clang version > > 11.0.0), > > the average time is 25.9s: > > That sounds high -- my runs are about half that time. Is that with a > debug build or an optimized one? > > Regards, > Jeff Davis Yes, I was running a debug version. I usually do 'CFLAGS=-O0 -g3' '--enable-cassert' '--enable-debug'. Test with a general build: Master: 12729ms 12970ms 12999ms With my patch(a pointer): 12965ms 13273ms 13116ms With your patch(flexible array): 12906ms 12991ms 13043ms Not obvious I suppose, anyway, your patch looks good to me. -- Adam Lee