lua-users home
lua-l archive

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

As lhf wrote, we are thinking about a generational collector. The
problem is not how to implement it, but whether it would do any good.
For some applications, a generational collector can be a real booster,
for others it can make no difference from mark & sweep.

To try to improve garbage collection in Lua, we need data about it in
real programs. So, if you think you can have problems with it, please
consider taking some time to tell us about your problems. If you prefer,
send the data directly to us [lua at tecgraf...]; we will keep it
confidential. We cannot promise anything, but such data will certainly
increase the chances.

What we want to know?

* the "size" of your problem (e.g. it should run in Xms but it takes

* the "size" of your data (how many tables? typical size of tables?
how many closures? etc.)

* do you know the time profile of the GC in your program? Where does
it take most time? (mark, sweep, traverse of tables, sweep of strings,
actually freeing memory, etc.)

* does your program respect the "generational hypothesis"? (that is,
most objects die young, before 2-5 GC cycles?)

* does your program have lots of constant data (such as tables that you
set up once, and after that never [or seldom] change again.)? How much?
(This is very important; mainly, those are the data a generational GC
can avoid visiting, and so is the source of its improvements.)

* feel free to tell anything else you think is relevant;

* don't forget to tell which version of Lua you are using, and whether
you modified it in any way that may affect the GC.

-- Roberto