lua-users home
lua-l archive

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


On 30/05/2019 15.53, Rodrigo Azevedo wrote:
> The performance (GC) is excellent again, thank you very much!

Can confirm, garbage collector performance is good:

    /tmp/lua-5.3.5/src $ time ./lua gc_benchmark.lua
    Lua 5.3

    real  0m44.687s
    user  0m42.724s
    sys  0m1.964s

    /tmp/lua-5.4.0-alpha/src $ time ./lua gc_benchmark.lua
    Lua 5.4

    real  0m42.717s
    user  0m40.920s
    sys  0m1.800s

-- gc_bechmark.lua (
local num_iterations = 1e8
local table_width = 1e8

print(_VERSION)

math.randomseed(os.time())
-- collectgarbage('stop')

local t = {}
for i = 1, num_iterations do
  t[math.random(table_width)] = {}
end
-- )

-- Martin