lua-users home
lua-l archive

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

My experience is summarized as below:

size of (constant) data table		12709 tables, 23019 strings,
					1928217 bytes compiled as luac.out
number of declared functions 		2509

The most typical GC delay is obviously due the traversal of large
nested string table. Without forcing GC to be executed, the default
collection sometimes takes up 2 to 3 seconds.

After using my patch of setconstant, which avoided the traversal
of static (old) tables and strings, the default collection time
dropped to around 1 second. 

A notable behavior of this Lua program is that it uses quite a lot
of small tables to construct temporary function callbacks (closure)
and also anonymous functions, which become garbage after the
closure is invoked. This takes up quite a big portion of sweep.

Then I forces a collection every 200 frames, it takes around 90ms
to collect each time.

My configuration is a laptop (toshiba portege 3440) PIII 500, 196MB
ram running Linux 2.4.17, and used Lua 4.0

I'd believe my program will benefit from a generation collector, 
but maybe not in a very significant manner. It is unlikely that
each collection will take less than 10ms. I'd much prefer a 5ms
delay every frame than a 40ms delay every 200 frames.

The ideal implementation would be that it is overall a generational
collector, but it can be controlled progressively at collecting the
new generation. Oh well, I've got no clue on this ...