lua-users home
lua-l archive

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



On 18/03/2008, at 12:18 AM, Asko Kauppi wrote:


LNUM_FLOAT Problematic. Math functions not ANSI C. Limited or no support on Windows. The only benefit I see is less memory consumption on embedded devices (speedwise, not much difference with LNUM_DOUBLE+LNUM_INT32). Is anyone actually using 'float' currently, and what is the main reason you do?


Agree with others, float is important from a memory perspective and to a lesser extent execution time. As a matter of interest on an ARM9 at 200MHz the difference between float on double in microsec is:

float op               float  double	
*                        12     15
/                        12     22    very significant
+                        10     13
–                        10     13
(long) to ...            10     10

Graham