[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 13 Jan 2010 11:38:11 -0200
> I'm also quite happy to see ephemeron tables introduced though I
> suspect one should still probably try to avoid creating semi-weak
> tables since the ephemeron logic is potentially quadratic.
You do not need to avoid semi-weak tables, only the situations that
make the algorithm quadratic (long chains of value->key references
without other external references to those keys).
A different point of view: even when the algorithm is quadratic (which
seems to be a rare condition), it is saving memory that would be blocked
forever in Lua 5.1 :)