[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Non-standard Lua number configurations
- From: Tom Sutcliffe <tomsci@...>
- Date: Mon, 24 Sep 2018 22:50:44 +0100
> On 20 Sep 2018, at 8:41 pm, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
>
> Hi!
>
> In "luaconf.h" we could choose datatypes for Lua integers and Lua floats (LUA_INT_TYPE, LUA_FLOAT_TYPE).
> I'm curious whether non-standard configurations exist in wide use or not?
>
> Could you provide examples, such as:
> "The router ${POPULAR_ROUTER_NAME} runs Lua with 32-bit integers instead of 64-bit",
> "The ${FAR_FAMED_GAME_SCRIPTING_ENV} implements Lua with 32-bit floats instead of double",
> and the like.
I've used 32-bit integers for both LUA_INT_TYPE and LUA_FLOAT_TYPE on a particularly resource limited home project - everything worked OK except for collectgarbage("count") which requires floating-point support in 5.3 to get an accurate figure (but didn't in 5.2, which made me a bit sad when I upgraded).
I think everywhere else I've stuck with the standard 64-bit ints and doubles. I don't have any info about any of the "major" Lua uses I'm afraid. Last time I coded on OpenWRT it was still using Lua 5.1 and hence used doubles for everything as far as I recall.
Cheers,
Tom