lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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/ .

-- 
Glenn Maynard