lua-users home
lua-l archive

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


> Ah, I see - it’s to exclude them from the mark and sweep. Have you tried doing it from C to see what the savings would be in a true use-case?

It doesn't make sense for me to try if the functionality is
deliberately hidden and may go away any time, which is what my
question is largely about.

> Have a bit trouble seeing how that would work, as the dependencies still would need to be marked? Or should those be made non-GC on assignment? That could get tricky if multiple entities can reference them?

Correct, the set of entities that could be stored that way would be
quite restricted (nested tables, functions without upvalues, or make
the first upvalue somehow 'not count' as a non-GC reference in Lua
5.2+, probably other pitfalls) but it could still be useful. It's
really complicated to expose that to Lua code but could be doable from
the C API...

Best regards,