vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, When creating a package for own usage (so it doesn't need to be portable), is it interessant to specify a particular architecture with the -mcpu=cpu-type and -march=cpu-type of gcc instead of the default 386 ? Is it really a gain in speed, or other advantage ? Thanks in advance, -- ^^ Gauthier (_____/°°-ç | \_`-" )/@mmm|| \nn \nn FOE-Belgium : http://www.amisdelaterre.be |
| |||
| On Thu, 12 Aug 2004 18:15:30 +0000, Gauthier wrote: > Hello, > > When creating a package for own usage (so it doesn't need to be > portable), is it interessant to specify a particular architecture with > the -mcpu=cpu-type and -march=cpu-type of gcc instead of the default > 386 ? Probably: yes. > Is it really a gain in speed, Between i386 and i686 it /is/ for most things. However behond that: not much. IME though, i586 as opposed to i486 doesn't generally gain much. > or other advantage ? Idunno. > Thanks in advance, Well, you might want to use "-O2". And "strip" the generated binaries. Other then that, some specific programs doing math stuff gain some speed from setting: MMX, 3D-Now, SSE, or whatever, options. -- -Menno. |
| ||||
| On Thu, 12 Aug 2004 19:49:31 +0000, Menno Duursma wrote: > On Thu, 12 Aug 2004 18:15:30 +0000, Gauthier wrote: [ GCC flags ] >> or other advantage ? > > Idunno. Thinking about this ... : if given program is to be run on a security boundary (suid/sgid, daemon, kernel, etc) it might make writing an exploit, for some vulnerability in it, somewhat harder. As such "optimizing" may (in some cases) be considerd an obscurety measure. Assuming here: the binary doesn't have the "readable" bit set for view (from the atackers previlege level) they'd probably have to guess an ofset. HTH. -- -Menno. |