[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Extending Lua for multiple light userdata types
- From: Tony <luatony@...>
- Date: Wed, 14 Nov 2012 13:35:04 -0800
On 11/14/2012 6:05 AM, Roberto Ierusalimschy wrote:
One of the main reasons that Lua uses double is to support full 32
bits. With a natural 32-bit integer, you could compile Lua with single
floats and then really reduce memory usage. But the introduction of
integers also solve a big reverse problem. Frequently, restricted
systems compile Lua with longs as its number type. And frequently,
there is the problem of how to manipulate floating point numbers on
those systems. Lua with 32-bit integers and single floats would use
much less memory, offering full 32 bits when needed, the speed of
integers for hardware without FP support, and floating point number
when necessary. -- Roberto
This would be especially useful for embedded use, since there are many
recent 32-bit MCUs with hardware single precision floating point (but
not double precision), and plenty of memory to run eLua or other minimal
Lua systems.
Tony
- References:
- Extending Lua for multiple light userdata types, Rena
- Re: Extending Lua for multiple light userdata types, Dirk Laurie
- Re: Extending Lua for multiple light userdata types, Rena
- Re: Extending Lua for multiple light userdata types, Dirk Laurie
- Re: Extending Lua for multiple light userdata types, Rena
- Re: Extending Lua for multiple light userdata types, Coda Highland
- Re: Extending Lua for multiple light userdata types, liam mail
- Re: Extending Lua for multiple light userdata types, Roberto Ierusalimschy
- Re: Extending Lua for multiple light userdata types, Wim Couwenberg
- Re: Extending Lua for multiple light userdata types, Roberto Ierusalimschy