[OSM-dev] [novice] osm2pgsql: mac os x: faster with compiler optimized flag -fast instead of -O2

Ceriel Jacobs cerieljacobs at gmail.com
Mon Feb 9 00:36:25 GMT 2009


-fast is not only about PowerPC

The gcc 4.0.1 manual, chapter optimize options [1]
indeed first talks about G5 optimazations during first (~four)  
paragraphs.
In the last paragraph intel optimizations using the -fast flag are  
mentioned, and this is said:

On Intel target, -fast currently enables the following optimization  
flags:

           -O3
           -fomit-frame-pointer
           -fstrict-aliasing
           -momit-leaf-frame-pointer
           -fno-tree-pre
           -falign-loops


All choices of flags enabled by -fast are subject to change without  
notice.


The same info is also mentioned in the Apple GCC man pages [2]:

On Intel target, -fast currently enables the following optimization  
flags:

            -O3 -fomit-frame-pointer -fstrict-aliasing -momit-leaf- 
frame-pointer -fno-tree-pre -falign-loops


[1] http://developer.apple.com/documentation/developertools/gcc-4.0.1/gcc/Optimize-Options.html#index-fast-475
[2] http://developer.apple.com/DOCUMENTATION/DARWIN/Reference/ManPages/man1/gcc.1.html

Op 8 feb 2009, om 13:31 heeft Martijn van Oosterhout het volgende  
geschreven:

> On Sun, Feb 8, 2009 at 1:06 PM, Jon Burgess <jburgess777 at googlemail.com 
> > wrote:
>> It is an option added by Apple. It looks like it is not much more  
>> than a
>> custom set of "-f..." flags which they've developed to generate  
>> better
>> code on the PowerPC CPUs.
>>
>> http://developer.apple.com/ReleaseNotes/DeveloperTools/RN-GCC3/index.html#/ 
>> /apple_ref/doc/uid/TP40001007-DontLinkElementID_17
>
> I see... Well, if people want to enable it they can (note the caveats,
> I think we're strict aliasing compliant but I havn't checked) but I'm
> surprised it would make a difference, since most of the time goes to
> the database, not  osm2pgsql itself I thought.
>
> Have a nice day,
> -- 
> Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/





More information about the dev mailing list