From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 1 20:43:42 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993C316A4BF for ; Thu, 1 Nov 2007 20:43:42 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.freebsd.org (Postfix) with ESMTP id 55E0713C4B3 for ; Thu, 1 Nov 2007 20:43:42 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.14.1/8.14.1) with ESMTP id lA1K8B8p060970; Thu, 1 Nov 2007 16:08:11 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.14.1/8.14.1/Submit) id lA1K8AjQ060969; Thu, 1 Nov 2007 16:08:10 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 1 Nov 2007 16:08:10 -0400 From: David Schultz To: "Dag-Erling =?us-ascii:iso-8859-1?B?U23DuHJncmF2?=" Message-ID: <20071101200810.GA60893@VARK.MIT.EDU> Mail-Followup-To: "Dag-Erling =?us-ascii:iso-8859-1?B?U23DuHJncmF2?=" , James Healy , freebsd-hackers@FreeBSD.ORG, Lawrence Stewart References: <47291254.9030909@swin.edu.au> <86odeewcgi.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii:iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86odeewcgi.fsf@ds4.des.no> Cc: James Healy , freebsd-hackers@FreeBSD.ORG, Lawrence Stewart Subject: Re: floating point operations X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2007 20:43:42 -0000 On Thu, Nov 01, 2007, Dag-Erling Smørgrav wrote: > James Healy writes: > > The remaining op is not easily converted to fixed point math, and we're > > wondering what impact a single flop on the receipt of each ACK will > > have. We don't have a strong understanding of the amount of overhead > > involved in executing a flop instead of an int op on modern hardware. > > Search the archives before posting. This precise topic was discussed > here earlier this week. The earlier thread was about a special-purpose variant of FreeBSD where user applications didn't use floating point, so don't assume that just because they got it to work it's a good idea in general. Floating point is often faster if it would take a lot more work to express the equivalent computation in terms of integers. On many processors, multiplying by 0.01 is faster than dividing by 100. HOWEVER, in the kernel all of this is likely to be dwarfed by the overhead of saving and restoring the FPU state. See the earlier thread for details.