Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 1997 22:41:45 -0700 (MST)
From:      Nate Williams <nate@mt.sri.com>
To:        Joao Carlos Mendes Luis <jonny@mailhost.coppe.ufrj.br>
Cc:        dg@root.com, hackers@freebsd.org
Subject:   Re: Compiling kernel with optimisation
Message-ID:  <199701130541.WAA23845@rocky.mt.sri.com>
In-Reply-To: <199701122231.UAA22599@gaia.coppe.ufrj.br>
References:  <199701121724.JAA25580@root.com> <199701122231.UAA22599@gaia.coppe.ufrj.br>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701130541.WAA23845>