lua-users home
lua-l archive

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


For anyone keeping track, I found a part of my program which
*does* suffer greatly when STEPMUL is high.  After another
round of tuning with lua 5.1w2 I compromised with the following:
STEPMUL = 2 (the default!)
and this line:
g->GCthreshold = 2*g->estimate;
replaced with:
g->GCthreshold = g->estimate;

This gives rather better peak memory usage than either
5.0.2 or 5.1wX and does not appear to negatively affect
speed even in the churningest parts of my app (so far).

I don't know what function the 2*g->estimate was supposed
to serve, but if it's important and subtle that the
factor be >1 then:
g->GCthreshold = (9*g->estimate)/8;
also works with only a little more peak-mem bloat. :)

Adam D. Moss wrote:
   g->GCthreshold = 2*g->estimate;
   (from a quick test it looks like 'g->GCthreshold = g->estimate'
   works as well as removing the line)

This yields (for my app):
STEPMUL    peakmem     FPS(speed)
12         2490K       106

... versus this for the default 5.1w2 func/settings:
STEPMUL    peakmem     FPS(speed)
2          4532K       109

Finally, here's the same statistic for lua 5.0.2 !
STEPMUL    peakmem     FPS(speed)
n/a        4480K       111

--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3