Subject: Re: default optimization
To: Jared D. McNeill <jmcneill@invisible.yi.org>
From: Wojciech Puchar <wojtek@wojtek.from.pl>
List: port-i386
Date: 01/22/2001 21:51:01
> > opcodes...
> 
> I seem to remember the same thing -- I thought that it was the
> '-march=...' flag that did the 'CPU code generation' thing.
------from gcc.info---------

`-mcpu=CPU TYPE'
     Assume the defaults for the machine type CPU TYPE when scheduling
     instructions.  The choices for CPU TYPE are:

     `i386'        `i486'        `i586'        `i686'        
     `pentium'     `pentiumpro'  `k6'                        

     While picking a specific CPU TYPE will schedule things
     appropriately for that particular chip, the compiler will not
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     generate any code that does not run on the i386 without the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     `-march=CPU TYPE' option being used.  `i586' is equivalent to
     `pentium' and `i686' is equivalent to `pentiumpro'.  `k6' is the
     AMD chip as opposed to the Intel ones.

`-m386'
`-m486'
`-mpentium'
`-mpentiumpro'
     Synonyms for -mcpu=i386, -mcpu=i486, -mcpu=pentium, and
     -mcpu=pentiumpro respectively.  These synonyms are deprecated.


in my many tests i found -mpentiumpro binaries are best as
"universal" ones.
runs near the same speed on i386 (compared to -m386), little slower (max
5%) on i486 (compared to -m486) but consumes much less memory, near the
same speed on i586 (compared to -mpentium) and fastest of
pentiumpro/II/III

isn't it a good idea to compile with -mpentiumpro by default?