From owner-freebsd-hackers Sat Apr 8 14:34:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 5846B37B7ED; Sat, 8 Apr 2000 14:34:43 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id OAA12743; Sat, 8 Apr 2000 14:34:43 -0700 (PDT) (envelope-from dillon) Date: Sat, 8 Apr 2000 14:34:43 -0700 (PDT) From: Matthew Dillon Message-Id: <200004082134.OAA12743@apollo.backplane.com> To: Kris Kennaway Cc: "Alexey N. Dokuchaev" , freebsd-hackers@FreeBSD.ORG Subject: Re: What are the best gcc optimization options for Pentium 200 MMX References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :On Sat, 8 Apr 2000, Alexey N. Dokuchaev wrote: : :> AFAIK, Linux Mandrake has it's kernel and userland highly optimized for :> Pentium architecture. However, they have additional gcc optimization :> flags turned on by default, including -O3 and -mfast_math. : :Can you say "gimmick"? :-) gcc often produces demonstrably broken code for :optimisation levels higher than -O. : :Probably the only useful and safe option apart from -O is the :-march=pentium/pentiumpro/pentiumii/etc option for using :processor-specific opcodes and instruction scheduling. :Kris I use -Os for everything. I wouldn't bother with anything else. Someone ran a bunch of benchmarks with various gcc/egcs options a while back and, frankly, the top half dozen combinations were so close to each other performance-wise that it just didn't matter. -Os was in that group, but also produced significantly smaller binaries. I wouldn't touch the -march stuff at all, nor would I use -O3 (which tries to inline standard static functions verses -O2) - that's useless on IA32 because call/returns are very fast (I had an argument with John Dyson about call/return overhead verses an L1 cache miss and we ran a bunch of timings. I lost the argument :-) call/return won the race handily). -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message