[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: K6 Optimized Debian Binaries



On Sat, Feb 19, 2000 at 10:14:05PM -0500, S. Salman Ahmed generated a stream of 1s and 0s:
> >>>>> "DM" == Dan Melomedman <dan@cg619985-a.adubn1.nj.home.com> writes:
>     DM>  In your case a good idea would be -march=i686. Note in this
>     DM> case the resulting binary will be only running on PPro and
>     DM> above. Consult GCC info page fore more info. You can do
>     DM> -mcpu=i686 so that the resulting binary will be running on any
>     DM> CPU, but -march should be faster. For instance -march will use
>     DM> 'cmov' instruction which is only available on i686. A very
>     DM> important switch is -funroll-loops which sometimes provides very
>     DM> nice improvement, if not almost always, BUT it's known to be
>     DM> buggy sometimes.
> 
> Hi Dan,
> 
> I would like to recompile kernel 2.2.14 with the extra C flags
> "-march=i686 -O3 -fomit-frame-pointer" to see what effect it has on
> speed and performance.
> 
> Where (ie in what makefile and what variable(s)) would I add these flags
> ?
> 

Well the makefiles are in src/linux and in src/linux/arch/i386/. Don't
expect much improvement in the kernel (If you want better performance
from the kernel, hack it). Use those flags when compiling CPU hogs 
,for example gzip. I have a K6-2, and compiling glibc with optimizations
doesn't seem much of a gain, maybe PPro optimizations are better. 

Many bottlenecks are in the libraries and the kernel, for instance glibc still uses IEEE floating point functions which are slow. But optimizing for your particular CPU should give you at least a 5% gain, after all why would those switches be there? 

If you want tips and tricks from people who are really into it, check
out http://goof.com/pcg/os2/tips.html (doesn't apply to OS/2 only).


Reply to: