From owner-freebsd-chat@FreeBSD.ORG Sat Mar 6 13:41:55 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 844E216A4CE for ; Sat, 6 Mar 2004 13:41:55 -0800 (PST) Received: from stephan.wmcustomer.com (stephan.wmcustomer.com [213.208.134.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id B01C543D41 for ; Sat, 6 Mar 2004 13:41:54 -0800 (PST) (envelope-from step@stephanmantler.com) Received: from stephanmantler.com (chello080109007168.5.14.univie.teleweb.at [80.109.7.168]) (authenticated bits=0)i26Lfe9e029054; Sat, 6 Mar 2004 22:41:53 +0100 Message-ID: <404A465A.1040009@stephanmantler.com> Date: Sat, 06 Mar 2004 22:44:58 +0100 From: stephan mantler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031030 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Narvi References: <20040306005744.T38020@haldjas.folklore.ee> <20040305153505.74061868.cpressey@catseye.mine.nu> <20040306013914.D38020@haldjas.folklore.ee> In-Reply-To: <20040306013914.D38020@haldjas.folklore.ee> X-Enigmail-Version: 0.82.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-chat@freebsd.org Subject: Re: FreeBSD Most wanted X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 21:41:55 -0000 Narvi wrote: >>"Familiarity with the target machine and its instruction set is a >>prerequisite for designing a good code generator. Unfortunately, in a >>general discussion of code generation it is not possible to describe >>the nuances of any target machine in sufficient detail to be able to >>generate good code for a complete language on that machine." >> -- The "Dragon" Book, pp 519 > > Sure - but code generation is but one part of the compiler and usualy not > the largest. Well, it is still a crucial part of the compiler and deeply tied into the rest. It is also the reason why simply using the Intel C++ compiler instead of .NET2003 (both at full optimization) made our vector math library run five times faster... guess who knows the target architecture ;-) In this highly specific example hand optimized assembler code is another four times faster for some functions, but I think this is not a problem of compilers per se. I guess the C/C++ language simply isn't giving the compiler all the information it would need. I haven't yet tried Intel's feedback optimization feature, but it will be interesting to see what it will do to our library. Also, to get a bit closer to the original topic. I can't remember where I read this (DDJ probably), but apparently programmers who have a deep understanding of computer architecture through low level programming also produce "better" code in high level languages. My interpretation is that they are simply feeding the compiler a better foundation to work with. Cheers, -stephan -- stephan mantler | web www.stephanmantler.com ----------------------------| net step@stephanmantler.com It's not an adventure | fon +43 (699) 104 128 42 until something f--ks up. | fax +43 (699) 404 128 42