lua-users home
lua-l archive

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


> Here is a pure-Lua test case that is very close to what my application is 
> doing. (Change N if needed).
>   local N = 6
>   local tb = setmetatable ({}, { __mode="k" })
>   print(collectgarbage"count")
>   for n=1,N do
>     for k=1,1e6 do tb[{}] = true end
>     print(collectgarbage"count")
>   end

This is the result in my machine (N = 16). It seems quite stable...
  
  18.9501953125
  386.978515625
  303.728515625
  467.197265625
  383.947265625
  300.697265625
  464.166015625
  380.916015625
  297.666015625
  461.134765625
  377.884765625
  294.634765625
  458.103515625
  374.853515625
  291.603515625
  455.072265625
  371.822265625

-- Roberto