NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: How to compose kernel makeoptions
On Feb 25, 2011, at 3:01 PM, charles wrote:
> the last time i compiled a kernel i just plugged in an i686.
>
> Where do i look for information about makeoptions settings for pentium3, or
> processor, optimization? I understand what the config option is asking for
> but so far can't figure out where to find that information.
The default compiler optimizations are likely to be "-O2 -fno-strict-aliasing",
which were chosen because they are almost certain to result in beneficial
improvements to performance and code size, most of the time. Potential
optimizations which are not helpful on average are not enabled by default,
until the situations where they are known to be useful can be identified by the
compiler at compile-time.
Using non-default optimization options isn't like discovering buried treasure
that nobody else was aware of. The options aren't enabled by default for good
reason(s), usually because the tradeoffs they make aren't helpful in general
(yet), or because their usage has known bugs which result in faulty executables
being produced.
You can try adding "-march=pentium3", but it is unlikely to result in a
noticeable difference for macro performance, although it's possible that some
microbenchmarks might show a more significant difference.
However, one issue that might make some difference is whether there are some
specialized assembly routines which are chosen based upon the CPU type. I'm
more familiar with this in FreeBSD than in NetBSD, ie:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/i386/i386/support.s
...where things like bzero, bcopy, copyin/copyout, etc have optimized variants
will be used if the right CPU type is set. Perhaps someone more familiar with
the NetBSD equivalent can offer some thoughts.
Regards,
--
-Chuck
Home |
Main Index |
Thread Index |
Old Index