[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: static strings [was Re: Lua Compile/one time Load?]
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 19 Oct 2023 15:16:23 -0300
> There are a few things it'd be nice to be able to tell stock Lua are
> static data it doesn't need to take a RAM copy of. C string literals
> are another example, although caveat emptor would have to apply, as of
> course even static data can stop being accessible if the code segment
> is unloaded.
It is not difficult to have in Lua a kind of 'lua_pushliteral' for
static strings, provided the string is "long" (at least 40 bytes).
My question is, would that be useful? If an application is written to be
small, would it have any significant number of long (or a few really
long) strings?
-- Roberto