Re: inline newNode()

From: Neil Conway <neilc(at)samurai(dot)com>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: inline newNode()
Date: 2002-10-10 17:28:47
Message-ID: 87k7kqmcds.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> On 10 Oct 2002, Neil Conway wrote:
> > Compiled with '-DBUFFER_SIZE=256 -O2', I get the following results in
> > seconds:
> >
> > MemSet(): ~9.6
> > memset(): ~19.5
> > __builtin_memset(): ~10.00
>
> I ran the same code. I do not understand the results you go.

Interesting -- it may be the case that the optimizations performed by
GCC are architecture specific.

I searched for some threads about this on the GCC list. One
interesting result was this:

http://gcc.gnu.org/ml/gcc/2002-04/msg01114.html

One possible explanation for the different performance you saw is
explained by Jan Hubicka:

http://gcc.gnu.org/ml/gcc/2002-04/msg01146.html

One thing that confuses me is that GCC decides *not* to use
__builtin_memset() for some reason, even though it appears to be
superior to normal memset() on both of our systems.

Cheers,

Neil

--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2002-10-10 17:34:14 Re: Open items
Previous Message Barry Lind 2002-10-10 16:40:19 Re: Out of memory error on huge resultset

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2002-10-10 17:38:05 Re: inline newNode()
Previous Message Bruce Momjian 2002-10-10 14:59:31 Re: inline newNode()