From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Jeff <threshar@torgo.978.org>
Cc: Neil Conway <neilc@samurai.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Sun performance - Major discovery!
Date: Wed, 8 Oct 2003 14:31:29 -0400 (EDT)
Message-ID: <200310081831.h98IVT919657@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.BSF.4.44.0310081408370.64781-100000@torgo.978.org>
Jeff wrote:
> On Wed, 8 Oct 2003, Neil Conway wrote:
>
> >
> > What CFLAGS does configure pick for gcc? From
> > src/backend/template/solaris, I'd guess it's not enabling any
> > optimization. Is that the case? If so, some gcc numbers with -O and -O2
> > would be useful.
> >
>
> I can't believe I didn't think of this before! heh.
> Turns out gcc was getting nothing for flags.
>
> I added -O2 to CFLAGS and my 60 seconds went down to 21. A rather mild
> improvment huh?
>
> I did a few more tests and suncc still beats it out - but not by too much
> now (Not enought to justify buying a license just for compiling pg)
>
> I'll go run the regression test suite with my gcc -O2 pg and the suncc pg.
> See if they pass the test.
>
> If they do we should consider adding -O2 and -fast to the CFLAGS.
[ CC added for hackers.]
Well, this is really embarassing. I can't imagine why we would not set
at least -O on all platforms. Looking at the template files, I see
these have no optimization set:
darwin
dgux
freebsd (non-alpha)
irix5
nextstep
osf (gcc)
qnx4
solaris
sunos4
svr4
ultrix4
I thought we used to have code that did -O for any platforms that set no
cflags, but I don't see that around anywhere. I recommend adding -O2,
or at leaset -O to all these platforms --- we can then use platform
testing to make sure they are working.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: pgman@candle.pha.pa.us, threshar@torgo.978.org, neilc@samurai.com, pgsql-hackers@postgresql.org
Subject: Re: Sun performance - Major discovery!
In-Reply-To: <200310081831.h98IVT919657@candle.pha.pa.us>
References: <Pine.BSF.4.44.0310081408370.64781-100000@torgo.978.org> <200310081831.h98IVT919657@candle.pha.pa.us>
* 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