Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2007 16:08:10 -0400
From:      David Schultz <das@FreeBSD.ORG>
To:        "Dag-Erling =?us-ascii:iso-8859-1?B?U23DuHJncmF2?=" <des@des.no>
Cc:        James Healy <jhealy@swin.edu.au>, freebsd-hackers@FreeBSD.ORG, Lawrence Stewart <lastewart@swin.edu.au>
Subject:   Re: floating point operations
Message-ID:  <20071101200810.GA60893@VARK.MIT.EDU>
In-Reply-To: <86odeewcgi.fsf@ds4.des.no>
References:  <47291254.9030909@swin.edu.au> <86odeewcgi.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 01, 2007, Dag-Erling Smørgrav wrote:
> James Healy <jhealy@swin.edu.au> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071101200810.GA60893>