lua-users home
lua-l archive

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


2009/8/10 Joshua Haberman <joshua@reverberate.org>:
> My question is how to make GC work properly, but also efficiently.
> Unlike Ruby and Python, Lua does not (from what I can see) let userdata
> objects define their own "mark" function.  This means that all objects
> that are reachable only through my container will get collected unless I
> do something to prevent that.

I think that this very kind of "feature" (I'd call it bloat) is what
makes Python or Ruby so slow compared to Lua. Keep in mind that using
a table environment for your userdata is still likely to keep your
special containers faster than they would in these languages. Tables
are the only structuring data type in Lua, why do you assume they are
not efficient when all the optimization efforts can be put into them ?