lua-users home
lua-l archive

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


> First of all I run the test suites in the same process and printed
> the value of collectgarbage 'count', with GC normally running:

I assume the numbering (1,2,3,...) is anchored in the program logic (that
is, they are related to fixed points in the computation), not in memory
conumption of something like that. If that is true, we only need the
very beginning of each trace to get into the problem:

> Test suite results after run (Lua 5.1)
> 1      95 kB     0.005 s
> 2     148 kB     0.003 s
> 3     171 kB     0.003 s

> Test suite results after run (Lua 5.2)
> 1     106 kB     0.006 s
> 2     124 kB     0.007 s
> 3     112 kB     0.003 s

> Test suite results after run (Lua 5.3)
> 1     130 kB     0.004 s
> 2     179 kB     0.002 s
> 3    1799 kB     12.8 s                  <<<<<<<<<<<<<<<<<<


> After that I switched off the GC and retested again, with these results:
> 
> Test suite results after run (Lua 5.1)
> 1     140 kB     0.002 s
> 2     249 kB     0.003 s
> 3     390 kB     0.002 s

> Test suite results after run (Lua 5.2)
> 1     128 kB     0.002 s
> 2     217 kB     0.003 s
> 3     333 kB     0.002 s

> Test suite results after run (Lua 5.3)
> 1     130 kB     0.003 s
> 2     220 kB     0.003 s
> 3    5793 kB     12.9 s                  <<<<<<<<<<<<<<<<<<

So, certainly Lua 5.3 is eating much more memory (and wasting a lot of
time doing that), at some specific points of the program. The difference
persists with the GC rurned off; so, it seems that the problem is not
that 5.3 is not collecting garbage properly, but that it is *generating*
much more garbage in the first place.

What does you program do? What does it do between points 2 and 3?

-- Roberto