[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Long and short strings (was: Memory usage stats for 5.2 vs 5.3)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 14 Jan 2015 11:23:43 -0200
> This structure implies that LUAI_MAXSHORTLEN must not be
> set to more than 255, right?
Yes. (The default value is 40.)
> The reference manual does not use the phrases 'short string'
> and 'long string' nor the word 'internalized', so these must count
> as implemetation details.
Yes.
> I'm curious: when a long string is used as a key in a table, will
> at that stage the string be internalized?
No. At that point, the string can already have two different instances
in Lua. Moreover, for every new long string, we would have to check
whether it has been internalized (which is the heaviest part of
internalizing).
-- Roberto