This is a discussion on Compile with optimizations within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Excuse my simple question, but I din't find a clear answer in the web. I compiled lame with optimizations ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Excuse my simple question, but I din't find a clear answer in the web. I compiled lame with optimizations (--enable-expopt=full) and I saw x3 faster processing. I will start to encode xvid, some optimized packages needed for Pentium3 Found only i486 tgzs, so I want to compile with optimizations. Found that I need to insert (where?) this flag: -march=Pentium3 (possibly -O3?) Some programs (like lame) have options to optimize in ./configure, some others not: 1. How I can compile with cflags? (the ./configure confuses me..) 1b. Maybe it's better to add "export CFLAGS="-O3 -march=Pentium3" in ~/.profile? I think it's dangerous, because some configure want their own flags. 2. Is dangerous (crash) to have some programs (let's say lame) compiled with _no_ optimizations (or libraries) and some other programs that depends from them to be with optimizations? 3. When you have an optimized Pentium 3 Slackware packages the i686 in filename is misleading, because i686 is Pentium MMX, right? So, what about the filename? lame-x.x-iP3-xyyy.tgz is ok? I am interest to stability, I don't bother to gain 3% faster processing. -- Please excuse my english writing! Slackware 11 Knowledge report: Newbie with custom kernel |
| |||
| korgman <korgie@gmail.com> wrote: > 3. When you have an optimized Pentium 3 Slackware packages the i686 in > filename is misleading, because i686 is Pentium MMX, right? So, what > about the filename? lame-x.x-iP3-xyyy.tgz is ok? Just an answer to this: no, Pentium (the original one) and Pentium-MMX are "i586", while Pentium-Pro, Pentium-II (= Pentium-Pro with MMX) and Pentium-III are i686 (the P4 is a rather special case as it's something IN-between a i686 and a i786 (the Itanium), they had already used the i786 id before the P4 came out). If you use "cat /proc/cpuinfo" you'll get something like this: vendor_id : GenuineIntel cpu family : 6 for a i686 (and "family 5" for a 586, of course), but vendor_id : GenuineIntel cpu family : 15 for a Pentium 4. Just to be complete, Core 2 (etc) processors are also "family 15", although they're not given the name Pentium at all anymore. AMD Athlon's are either family 6 or family 15, depending on the specific cpu (but AuthenticAMD, of course). In practice you won't see many i586's anymore as they didn't come any higher then 200 MHz. -- ************************************************** ****************** ** Eef Hartman, Delft University of Technology, dept. EWI/TW ** ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 ** ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands ** ************************************************** ****************** |
| |||
| On 2007-01-30, Eef Hartman <E.J.M.Hartman@math.tudelft.nl> wrote: > no, Pentium (the original one) and Pentium-MMX are "i586", while > Pentium-Pro, Pentium-II (= Pentium-Pro with MMX) and Pentium-III are i686 > (the P4 is a rather special case as it's something IN-between a i686 and a > i786 (the Itanium), they had already used the i786 id before the P4 came out). Ok, I don't disagree, Pentium 3 is on i686 family. BUT it has extra SSE commands. So, if I compile a package for Pentium3 (with mmx, sse) it will run on Pentium 2 or Pentium Pro? Thus my question if the name i686 is correct or P3 is better. -- Please excuse my english writing! Slackware 11 Knowledge report: One year, still plenty to learn |
| |||
| On 2007-01-30, korgman <korgie@gmail.com> wrote: > Thus my question if the name i686 is correct or P3 is better. Hmmm, just checked avidemux form slacky.it, allthough is labeled as i486 it has SSE optimizations. My worries are lower.. -- Please excuse my english writing! Slackware 11 Knowledge report: One year, still plenty to learn |
| ||||
| korgman <korgie@gmail.com> wrote: > So, if I compile a package for Pentium3 (with mmx, sse) > it will run on Pentium 2 or Pentium Pro? This is the difference between -march and -mtune. If you use the argument -march=pentium3 to gcc it might generate code that requires a pentium3 CPU. If you instead use the argument -mtune=pentium3 gcc will do its best to optimze the code for pentium3 but still being backwards compatible. > Thus my question if the name > i686 is correct or P3 is better. If you don't care about compability with other i686 CPUs but only want max optimization for pentium3 go for "-march=pentium3" and name the arch part of the package something like p3 or pentium3 to show this. If you want backwards compability in your package but still think that performance is most important on a pentium3 cpu you can do something like: "-march=i486 -mtune=pentium3" and then name the package i486. regards Henrik -- The address in the header is only to prevent spam. My real address is: hc1(at)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost |