From owner-freebsd-hackers@FreeBSD.ORG Thu May 15 07:46:11 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 579CE37B404; Thu, 15 May 2003 07:46:11 -0700 (PDT) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3EF343F85; Thu, 15 May 2003 07:46:09 -0700 (PDT) (envelope-from Alexander@Leidinger.net) Received: from fwd03.sul.t-online.de by mailout04.sul.t-online.com with smtp id 19GJzh-00009p-03; Thu, 15 May 2003 16:46:05 +0200 Received: from Andro-Beta.Leidinger.net (520065502893-0001@[217.229.217.210]) by fmrl03.sul.t-online.com with esmtp id 19GJzQ-0OikboC; Thu, 15 May 2003 16:45:48 +0200 Received: from Magelan.Leidinger.net (Magelan [192.168.1.1]) h4FEji3G015833; Thu, 15 May 2003 16:45:44 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magelan.Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.12.9/8.12.9) with SMTP id h4FEjiiC002220; Thu, 15 May 2003 16:45:44 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Thu, 15 May 2003 16:45:44 +0200 From: Alexander Leidinger To: freebsd-performance@freebsd.org Message-Id: <20030515164544.6ade3b2e.Alexander@Leidinger.net> In-Reply-To: <20030515123033.GP45118@garage.freebsd.pl> References: <20030515123033.GP45118@garage.freebsd.pl> X-Mailer: Sylpheed version 0.8.10claws (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Sender: 520065502893-0001@t-dialin.net cc: freebsd-hackers@freebsd.org Subject: Re: Optimizations. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-performance@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 14:46:11 -0000 On Thu, 15 May 2003 14:30:33 +0200 Pawel Jakub Dawidek wrote: > IMHO optimization in FreeBSD's code has too low priority. > Maybe is time to think about some 'optimiztion team' creation? The actual goal is to finish the "SMPng"-feature (and other new 5.x technologie). After that the "roadmap" (there's no official one, but if you read -current you read sometimes about what is written on the TODO lists) says something about optimizing those features. You know, premature optimization is evil, do you? > value is. They should have experience in old-school optimization (there are > many places where '* (2^n)' could be changed to '<< n' and many places where Are you sure? Compare the produced code, if the value is known to be a power of 2 at compile time, this optimization gets already performed by the compiler. Regardless of the fact that todays compilers already do a good job with such easy optimizations, not every place where you could improve the produced code is worth to improve in such a way (if you improve the code by 1ms but the complete "action" takes 1000ms it isn't worth... and optimizing algorithms gives you most of the time much more bang for the bucks...). Personally I prefer readability of the algorithm instead of speed in such situations. The actual performance difference between gcc and icc doesn't comes from such optimizations, its from using SIMD code and from scheduling the instructions in a different way (on a P4 you get huge benefits from this), so the time is better spend on improving those aspects of gcc instead. Bye, Alexander. -- The three Rs of Microsoft support: Retry, Reboot, Reinstall. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7