Re: Optimization levels when compiling PostgreSQL... - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Optimization levels when compiling PostgreSQL...
Date
Msg-id 873csi5txb.fsf@mailbox.samurai.com
Whole thread Raw
In response to Re: Optimization levels when compiling PostgreSQL...  (Sean Chittenden <sean@chittenden.org>)
Responses Re: Optimization levels when compiling PostgreSQL...  (Sean Chittenden <sean@chittenden.org>)
Re: Optimization levels when compiling PostgreSQL...  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Sean Chittenden <sean@chittenden.org> writes:
> Agreed, however some of the loop-unrolling might prove to have some
> optimization, but we'll see.  I'd like to think that there's some
> actual value in -O6 beyond the geek appeal of being able to say it's
> been compiled with all the optimizations possible.  ::shrug::

BTW, -O3 is the highest GCC optimization level; anything higher than
that is synonymous with -O3, I believe. Also, -O3 doesn't have
anything to do with loop unrolling, AFAIK.

As for the value of enabling that flag, it depends IMHO on the
performance gain you see. If there is a significance difference, let
-hackers know, and it might be worth considering enabling it by
default for certain platforms. If the performance difference is
negligible (which is what I'd suspect), I don't think it's worth the
code bloat, reduced debuggability, or the potential for running into
more compiler bugs.

Also, if -O3 *is* a good compiler option, I dislike the idea of
enabling it for your own packages but no one else's. IMHO distributors
should not futz with packages more than is strictely necessary, and a
change like this seems both unwarranted, and potentially dangerous. If
-O3 is a good idea, we should make the change for the appropriate
platforms in the official source, and let it get the widespread
testing it requires.

Cheers,

Neil

-- 
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC



pgsql-hackers by date:

Previous
From: Curt Sampson
Date:
Subject: Re: Script to compute random page cost
Next
From: Neil Conway
Date:
Subject: Re: Optimization levels when compiling PostgreSQL...