From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] p9/linux/fbsd compiler shootout From: "rob pike" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 26 Feb 2002 09:18:36 -0500 Topicbox-Message-UUID: 562f72d0-eaca-11e9-9e20-41e7f4b1d025 Again, and strongly, there was little effort made to make the Plan 9 C compilers generate good floating point code. I predict much less difference using normal, integer code - such as the kernel - which did receive some optimization attention. Also, the kernel spends most of its time in memmove and memset, both of which are written in assembler and therefore are not affected by the compiler. I doubt the quality of complation of the kernel has a minor effect on runtime of the compiler itself. Russ Cox points out that: the linux guys decided that the default floating-point precision should be 80-bit in-register precision but with 64-bit in-memory precision. i realize that this is sometimes desirable if you know what you're doing, but they made it the default. so code ends up behaving differently (usually incorrectly) based on what gcc registerizes and what overflows into memory. #include #include #include void main(void) { double x, y; x = sqrt(3.0); y = sqrt(3.0) - x; if(y) printf("buggered\n"); } -rob