From owner-freebsd-hackers Sun Jan 12 21:42:10 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id VAA20399 for hackers-outgoing; Sun, 12 Jan 1997 21:42:10 -0800 (PST) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id VAA20394 for ; Sun, 12 Jan 1997 21:42:08 -0800 (PST) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id WAA23845; Sun, 12 Jan 1997 22:41:45 -0700 (MST) Date: Sun, 12 Jan 1997 22:41:45 -0700 (MST) Message-Id: <199701130541.WAA23845@rocky.mt.sri.com> From: Nate Williams To: Joao Carlos Mendes Luis Cc: dg@root.com, hackers@freebsd.org Subject: Re: Compiling kernel with optimisation In-Reply-To: <199701122231.UAA22599@gaia.coppe.ufrj.br> References: <199701121724.JAA25580@root.com> <199701122231.UAA22599@gaia.coppe.ufrj.br> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Joao Carlos Mendes Luis writes: > #define quoting(David Greenman) > // >I just noticed that when compiling a kernel it is done with the -O flag. > // >Would there be much speed improvement in the sytem if it was done with > // >-O3? Would this break the kernel or is the added time it takes to compile > // >not worth the benfits? > // > // It has very little effect on performance and optimizations levels > "-O" > // have traditionally been broken in gcc. > > Well, the NetBSD team has managed to compile their kernel with -O6 > and -Wall, but they had to change lots of things.. > > I don't know what do you call "little effect on performance", but > 5% gain would be enough to make me think about. 5% kernel improvement would end up being lost in the noise for 'overall' system improvement. And, the possible (probably in this case) loss in stability due to a buggy optimizer and/or x86 support is simply not worth it. Even a 15% performance increase for the kernel might not even show up. (Sometimes kernel improvements can be losses in performance due to cache busting and other assorted details.) Nate