[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Floating point performance (was Re: compiling LUA for uClinux)
- From: Glenn Maynard <glenn@<a href="/cgi-bin/echo.cgi?zewt.org">...</a>>
- Date: Tue, 5 Apr 2005 22:33:47 -0400
On Tue, Apr 05, 2005 at 08:16:16PM +0300, Asko Kauppi wrote:
> I did some, and the use of double or int is fairly the same speed on
> modern (PowerPC, i686) processors. However, the 'int' variant was not
> pure int, but a mixture of int and float, which does create some
> conversion overhead. Anyhow, I can say that at least there is no order
> of magnitude difference between the two.
Just FYI, converting from float to int is more expensive on an x86 machine
than many people realize, if you're using casts to convert. A somewhat
long-winded explanation of this is at http://mega-nerd.com/FPcast/ .