Re: Add LogicalTapeSetExtend() to logtape.c

From: Adam Lee <ali(at)pivotal(dot)io>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Subject: Re: Add LogicalTapeSetExtend() to logtape.c
Date: 2020-03-03 01:49:35
Message-ID: 20200303014935.GA1022@earth.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-03-03 03:08:28 Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side
Previous Message Erik Rijkers 2020-03-03 01:48:24 Re: SQL/JSON: functions