lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo  wrote:
> Lua 5.1 (work4) is now available for testing at

I built luasocket beta3 for 5.1 work4 and ran Diegos testsrvr/testclnt.

I modified Diegos test() function to report Lua memory usage
before and after collection() with each test.

e.g.
function test(test)
    local mem="memory=" ..tostring(collectgarbage'count')
    collectgarbage()
    collectgarbage()
    local mem2="  memory=" ..tostring(collectgarbage'count') .. "\n"

    io.stderr:write("----------------------------------------------\n",
        "testing: ", test, "\n", mem, mem2,
        "----------------------------------------------\n")
end

The final test output reads like:

lua 5.0.2
----------------------------------------------
testing: blocking timeout on receive
memory=2448 4896  mem2=299 598
----------------------------------------------
<etc>
----------------------------------------------
testing: done in 76.52s
memory=2448 4896  mem2=299 598
----------------------------------------------


lua 5.1 work 4

----------------------------------------------
testing: blocking timeout on receive
memory=6291  memory=199
----------------------------------------------
<etc>
----------------------------------------------
testing: done in 80.33s
memory=7062  memory=199
----------------------------------------------

Note that 5.1 seems to use a *lot* more memory than 5.0.2 and also
note the 15% reduction in time taken.

Let me know if ypu want the complete script output.


DB