From owner-freebsd-hackers Thu Feb 13 13:26:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA09844 for hackers-outgoing; Thu, 13 Feb 1997 13:26:38 -0800 (PST) Received: from vader.cs.berkeley.edu (vader.CS.Berkeley.EDU [128.32.38.234]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA09834 for ; Thu, 13 Feb 1997 13:26:35 -0800 (PST) Received: (from asami@localhost) by vader.cs.berkeley.edu (8.8.4/8.7.3) id NAA18583; Thu, 13 Feb 1997 13:25:59 -0800 (PST) Date: Thu, 13 Feb 1997 13:25:59 -0800 (PST) Message-Id: <199702132125.NAA18583@vader.cs.berkeley.edu> To: hamby@aris.jpl.nasa.gov CC: hackers@FreeBSD.ORG In-reply-to: (message from Jake Hamby on Thu, 13 Feb 1997 11:46:52 -0800 (PST)) Subject: Re: Sun Workshop compiler vs. GCC? From: asami@vader.cs.berkeley.edu (Satoshi Asami) Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk * optimization than previous versions. With the -fast option (which turns * on full optimization, plus 486, Pentium, or PPro optimization as * appropriate), it does seem to take about 3 times as long to compile * anything as GCC (on my 486DX4/100), and so I would hope that the generated * code is much better. Well, I don't think so. Compiler optimizations are generally the best examples of "law of dimishing returns". ;) * Can anyone come up with a good realistic test program for me to compare * Sun's compiler and GCC? In order to make this topic even marginally Compile a little loop (daxpy?) and compare the assembly languge output. You'll be astonished how stupid compilers are. * One final observation: Isn't it scary that merely by recompiling their OS * with the new compiler, the next version of Solaris/x86 (2.6) should be * significantly faster than the previous version, making it an even bigger * threat to the free UNIX's for commercial users, and ESPECIALLY the * education market? While FreeBSD and Linux have an advantage by being I'm optimistic about this. My understanding is that the slowness and number of bugs of Solaris is intrinsic to its complexity of design (and also the fact that it was designed for workstations in mind, initially). You just can't make a huge mammoth run fast, no matter how much cash you sink into the compiler. Compiler optimization is no cure for bad design. Besides, Solaris x86 is such a festering piece of crap I can't believe anyone actually using it for "serious" work. I'm now having sooooo much fun trying to connect a bunch of disks to it (I need to yank and reinsert cables at the right moment during boot, can't have an IDE disk in the system if there is a SCSI disk with ID > 7, can't have three SCSI adapters active at the same time or the system will hang, etc.). FreeBSD beats Solaris hands down in every aspect (reliability, ease of configuration (/devices/pci@0,0/pci1011,1@f/pci9004,7278@4/cmdk@0,0:q,raw is not my idea of simplicity), performance). Satoshi