From owner-freebsd-stable Sat Apr 28 3:10: 6 2001 Delivered-To: freebsd-stable@freebsd.org Received: from krycek.zoominternet.net (krycek.zoominternet.net [63.67.120.9]) by hub.freebsd.org (Postfix) with SMTP id C754637B423 for ; Sat, 28 Apr 2001 03:10:01 -0700 (PDT) (envelope-from dmmiller@cvzoom.net) Received: (qmail 31709 invoked from network); 28 Apr 2001 10:08:59 -0000 Received: from acs-24-154-37-140.zoominternet.net (HELO cvzoom.net) (24.154.37.140) by krycek.zoominternet.net with SMTP; 28 Apr 2001 10:08:59 -0000 Message-ID: <3AEA96F8.C217C8BF@cvzoom.net> Date: Sat, 28 Apr 2001 06:10:00 -0400 From: Donn Miller X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Steve O'Hara-Smith Cc: Dimitry Andric , jonny@jonny.eng.br, stable@FreeBSD.ORG Subject: Re: Trouble with 4.3-RELEASE compiler References: <20010427194022.A18639@roma.coe.ufrj.br> <200104280127330789.011EEEF5@tensor.xs4all.nl> <20010428093802.59828860.steveo@eircom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Steve O'Hara-Smith wrote: > I have been working getting swish++ set up as a port (4.3-STABLE) and > I've found that the search program only works if compiled with no -O setting, > -O3 (the original) and -O cause segmentation violation, while -O2 gave an > illegal instruction trap. The index program OTOH appears to work with all > optimisations settings. > > It makes me wonder just how safe -O is :( I think Window Maker compiles parts of its code with -O0. Must be for good reason. I think the only time you're going to see a huge difference due to advandced gcc optimization levels (-O2 and up) is if you have a lot of very large loops in your code. In the real world, there really aren't too many apps that have enormous nested loops. If you want to make a program run faster, you've got to write implement better algorithms, and its as simple as that. Beyond that, you'll just have to get faster HW. I think most compilers have optimization bugs, because you use them with the understanding that they generate faster/smaller code at the expense of potential side effects. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message