Subject: optimizations [for non-debugging] amd64 kernels
To: None <port-amd64@netbsd.org>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: port-amd64
Date: 09/11/2007 05:08:32
Taking a cue from FreeBSD, I built a kernel with the following added
to COPTS on amd64:

optimizations:

-finline-limit=8000 --param inline-unit-growth=100 --param
large-function-growth=1000 -frename-registers

safety/paranoia:

-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -mfmpath=387

One can also add -fno-asynchronous-unwind-tables, but [unless the
compiler does something wrong] IIRC these tables don't actually get
loaded into memory.

On EMT64 machines, -march=nocona is also a win.

I haven't done any formal benchmarks, but the difference seems clear
when compiling packages.

--Blair