From owner-freebsd-current Mon Apr 5 21:59:33 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 185811518C for ; Mon, 5 Apr 1999 21:59:31 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id VAA01999; Mon, 5 Apr 1999 21:57:34 -0700 (PDT) (envelope-from dillon) Date: Mon, 5 Apr 1999 21:57:34 -0700 (PDT) From: Matthew Dillon Message-Id: <199904060457.VAA01999@apollo.backplane.com> To: current@FreeBSD.ORG Subject: EGCS optimizations Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 does not change the assembly output at all. -march= 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