lua-users home
lua-l archive

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

Roberto Ierusalimschy wrote:
Not exactly. A simple constant folding would only move the concatenation
from run time to compile time (which in Lua is not such a big
difference, unless the string is defined multiple times).

And unless you have a very small amount of memory (e.g. in embedded systems).

> The compiler would still create all those small strings and keep
> them alive, as they are constants in the code.

Too bad... couldn't it infer that they're not referred anywere? (just out of curiosity, I'm definitely not an expert on this)