From owner-freebsd-hackers@FreeBSD.ORG Thu May 15 23:16:42 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 27C8537B401 for ; Thu, 15 May 2003 23:16:42 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21CF743FCB for ; Thu, 15 May 2003 23:16:41 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc0iq.dialup.mindspring.com ([209.86.2.90] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19GYW3-00030W-00; Thu, 15 May 2003 23:16:28 -0700 Message-ID: <3EC481D3.124F61B8@mindspring.com> Date: Thu, 15 May 2003 23:14:43 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Wes Peters References: <20030515123033.GP45118@garage.freebsd.pl> <200305151407.28717.wes@softweyr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4ec47860be717d10c2dbddb01a9b4ce87a8438e0f32a48e08350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: Optimizations. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 06:16:42 -0000 Wes Peters wrote: > On Thursday 15 May 2003 08:19, Pawel Jakub Dawidek wrote: > > Messy code? Why? People skilled in optimization know which parts of > > code should be really optimized and which aren't important from > > performance point of view at all (code profiling?). Good optimized > > code shouldn't be ugly, ehh. > > People skilled in optimization know to profile the code and find what is > slowing real, actual applications down before attempting to profile > anything. You can't imagine how uninterested any FreeBSD developer is > in optimizing getuid() so it will out-perform Linux on some completely > braindead benchmark. Show me an application that is getuid() > performance bound and I'll show you an application that is so poorly > written as to be meaningless. What about "gettimeofday()"? There are a number of applications, particularly HTTP protocol applications, with strict timestamp logging requirements, mandated by standards. The tend to call gettimeofday() up to six times per transaction. Examples will include HTTP proxies, L7 load balancers, and proxy caches. Any box competing in the Cisco CSS/F5 falls into this category. Personally, I think the discussion about compiler option in this thread is useless (want a good compiler? Join the FSF GCC project, and do your work in that context, instead of FreeBSD), but there are valid targets of opportunity for optimizing things, above and beyond "good micro benchmark scores". -- Terry