Re: COPY FROM performance improvements

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Luke Lonergan <llonergan(at)greenplum(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Alon Goldshuv <agoldshuv(at)greenplum(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: COPY FROM performance improvements
Date: 2005-08-10 16:54:46
Message-ID: 200508101654.j7AGskd18845@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Luke Lonergan wrote:
> Tom,
>
> On 8/10/05 8:37 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > Luke, I dislike whacking people upside the head, but this discussion
> > seems to presume that raw speed on Intel platforms is the only thing
> > that matters. We have a few other concerns. Portability, readability,
> > maintainability, and correctness all trump platform-specific
> > optimizations. The COPY patch as presented lost badly on all those
> > counts, and you are lucky that it didn't get rejected completely.
>
> It's a pleasure working with you too Tom :-)
>
> Until you present a result on platform that is faster than Alon's in the
> code that was modified, our proof still stands that his is 20% faster than
> yours.

Well, we could write it in assembler and make it even faster. :-)

I assume no one is suggesting that, so in such cases, we need to weigh
readability with performance. I have not looked at the patch issues,
but usually loop unrolling is the opposite of readability, so we have to
make a tradeoff. We have used macros in places where function call
overhead is a major hit, so we can consider loop unrolling in places
that are a major performance hit. The macros we have used have
maintained the readability of the function call (unless you look at the
macro contents) so perhaps the optimizations you suggest can be done
with a similar eye to readability.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Joshua D. Drake 2005-08-10 16:56:00 Re: COPY FROM performance improvements
Previous Message Alvaro Herrera 2005-08-10 16:46:49 Re: COPY FROM performance improvements