lua-users home
lua-l archive

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

> 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 :)

-- Roberto