X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id C4664D1B506 for ; Wed, 8 Oct 2003 18:51:21 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 22046-03 for ; Wed, 8 Oct 2003 15:50:37 -0300 (ADT) Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by svr1.postgresql.org (Postfix) with ESMTP id A4C7ED1B4EF for ; Wed, 8 Oct 2003 15:50:35 -0300 (ADT) Received: from dunslane.net (x.ncshp.org [199.90.235.43]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id h98Iiux13908 for ; Wed, 8 Oct 2003 13:44:57 -0500 Message-ID: <3F845C70.8060108@dunslane.net> Date: Wed, 08 Oct 2003 14:50:24 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Postgresql Hackers Subject: Re: [PERFORM] Sun performance - Major discovery! References: <200310081831.h98IVT919657@candle.pha.pa.us> In-Reply-To: <200310081831.h98IVT919657@candle.pha.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/440 X-Sequence-Number: 45122 Bruce Momjian wrote: >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. > > > Actually, I would not be surprised to see gains on Solaris/SPARC from -O3 with gcc, which enables inlining and register-renaming, although this does make debugging pretty much impossible. worth testing at least (but I no longer have access to a Solaris machine). cheers andrew