Subject: possible 'optimal' GCC optimizing settings (from the gcc mailing
To: None <>
From: George Michaelson <>
List: tech-toolchain
Date: 08/12/2003 14:27:28
just a reference to:
	Scott Robert Ladd 
I know nothing about the validity of this model of testing, or its applicability
to NetBSD, but if it helps with choices for compiler flags settings in
3.3.1 then maybe its of use? (its for gcc 3.4)



The lpbench program is a modernization and extension of the classic LINPACK
benchmark, written by myself in C. Here are run-times with the general-purpose
optimization options; all tests were performed on a dual 600MHz Pentium III
system that sits in a corner and chews on "stuff" for me. All compiles included
the -march=pentium3 option, and were executed with gcc 3.4 20030806.

    -O1    39.6 seconds
    -O2	   39.7 seconds
    -O3    39.9 seconds

After testing 10,000 possibilities (selected by breeding 100 possibilities for
100 generations), gccga identified the following command line as the "best":

    -O1 -fstrength-reduce -fprefetch-loop-arrays \
        -finline-functions -fgcse -freduce-all-givs

Compiled with the options above, lpbench ran in 24.5 seconds.