Date: Mon, 5 Apr 1999 21:57:34 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: current@FreeBSD.ORG Subject: EGCS optimizations Message-ID: <199904060457.VAA01999@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
Well, I played around with egcs a bit. I had blown away my original gcc
install so I couldn't compare egcs w/ gcc, but I did mess around with
egcs's optimization options.
My conclusion: Don't bother with -mpentiumpro or -march=pentiumpro.
Not only do they not result in better performance, -march=pentiumpro
will not run on a K6-2. I dunno about a K6-3. -m<cpu> does not change
the assembly output at all. -march=<cpu> does change the assembly output,
but does not appear to result in any noticeable improvement in performance
over not using -m at all.
However, -Os does seem to produce slightly smaller binaries compared with
-O2 and actually does not appear to cost performance on my PPro-200.
before
-r--r--r-- 1 root wheel 543096 Apr 5 21:29 /usr/lib/libc.so.3
-r-xr-xr-x 1 root wheel 1517032 Apr 5 20:37 /usr/libexec/cc1
-r-xr-xr-x 1 root wheel 1580456 Apr 5 20:37 /usr/libexec/cc1obj
-r-xr-xr-x 1 root wheel 1928112 Apr 5 20:37 /usr/libexec/cc1plus
after
-r--r--r-- 1 root wheel 538872 Apr 5 21:35 /usr/lib/libc.so.3
-r-xr-xr-x 1 root wheel 1479240 Apr 5 21:47 /usr/libexec/cc1
-r-xr-xr-x 1 root wheel 1538376 Apr 5 21:47 /usr/libexec/cc1obj
-r-xr-xr-x 1 root wheel 1876464 Apr 5 21:47 /usr/libexec/cc1plus
Compiling up /usr/src/usr.sbin with egcs and libc compiled with:
-O2 160 seconds
-O2 -march=pentiumpro 162 seconds
-Os 161 seconds
Which leads me to believe that using -Os might be beneficial.
-Matt
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904060457.VAA01999>
