X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0E328DA02B for ; Tue, 4 Oct 2005 11:31:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39717-03 for ; Tue, 4 Oct 2005 14:31:00 +0000 (GMT) Received: from svana.org (svana.org [203.20.62.76]) by svr1.postgresql.org (Postfix) with ESMTP id 8A49ED9FE4 for ; Tue, 4 Oct 2005 11:31:00 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian)) id 1EMnoZ-0006GX-00; Wed, 05 Oct 2005 00:30:43 +1000 Date: Tue, 4 Oct 2005 16:30:42 +0200 From: Martijn van Oosterhout To: Tom Lane Cc: Simon Riggs , Ron Peacetree , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] A Better External Sort? Message-ID: <20051004143041.GH17589@svana.org> Reply-To: Martijn van Oosterhout References: <18329659.1128188552696.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> <20051001215602.GG13830@svana.org> <29837.1128223567@sss.pgh.pa.us> <20051002123240.GA30492@svana.org> <20051002193835.GJ30492@svana.org> <1128376292.8603.142.camel@localhost.localdomain> <20051004100441.GC17589@svana.org> <1128425094.8603.296.camel@localhost.localdomain> <20051004122443.GF17589@svana.org> <7788.1128434784@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="82evfD9Ogz2JrdWZ" Content-Disposition: inline In-Reply-To: <7788.1128434784@sss.pgh.pa.us> User-Agent: Mutt/1.3.28i X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200510/182 X-Sequence-Number: 74041 --82evfD9Ogz2JrdWZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 04, 2005 at 10:06:24AM -0400, Tom Lane wrote: > Martijn van Oosterhout writes: > > I'm using: gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) >=20 > I don't know what the units of this number are, but it's apparently far > too gcc-version-dependent to consider putting into our build scripts. > Using gcc version 4.0.1 20050727 (current Fedora Core 4 compiler) on > i386, and compiling tuplesort.c as you did, I find: > -O2: warning goes away between 800 and 900 > -O3: warning is always there (tried values up to 10000000) > (the latter behavior may indicate a bug, not sure). Facsinating. The fact that the warning goes away if you don't specify -finline-limit seems to indicate they've gotten smarter. Or a bug. We'd have to check the asm code to see if it's actually inlined or not. Two options: 1. Add -Winline so we can at least be aware of when it's (not) happening. 2. If we can't get gcc to reliably inline, maybe we need to consider other options? In particular, move the isNull test statements out since they are ones the optimiser can use to best effect. Add if we put in -Winline, it would be visible to users while compiling so they can tweak their own build options (if they care). --=20 Martijn van Oosterhout http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. --82evfD9Ogz2JrdWZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFDQpIQIB7bNG8LQkwRAiz/AJ9uTse88BNBE1Tpx2BO++JWu1dAGQCfah2X P3fB56iJZap07zm0pfC7EZ4= =KEhp -----END PGP SIGNATURE----- --82evfD9Ogz2JrdWZ--