From: Adam Lee <ali@pivotal.io>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers@postgresql.org, Peter Geoghegan <pg@bowt.ie>
Cc: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Subject: Re: Add LogicalTapeSetExtend() to logtape.c
Date: Tue, 3 Mar 2020 09:49:35 +0800
Message-ID: <20200303014935.GA1022@earth.local> (raw)
In-Reply-To: <619e61919fd604c2caa629536ee87615b732e054.camel@j-davis.com>
References: <e54bfec11c59689890f277722aaaabd05f78e22c.camel@j-davis.com>
<20200228061641.GA883@earth.local>
<619e61919fd604c2caa629536ee87615b732e054.camel@j-davis.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ali@pivotal.io, pgsql@j-davis.com, pg@bowt.ie, heikki.linnakangas@iki.fi
Subject: Re: Add LogicalTapeSetExtend() to logtape.c
In-Reply-To: <20200303014935.GA1022@earth.local>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox