lua-users home
lua-l archive

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



> On Nov 23, 2017, at 4:45 AM, Rodrigo Azevedo <rodrigoams@gmail.com> wrote:
> 
> This message is an update about a problem from last year [1] on the performance of the following simple script
> 
> -- collectgarbage("generational")
> N = 2.0e7
> C = {}
> for i=1,N do C[i] = i end
> print(string.format("%.1f",collectgarbage("count")))
> for i=1,10*N do
>     local a = {1,2,3,4}
> end
> print(string.format("%.1f",collectgarbage("count")))
> 
> motivated by the recent statement of Roberto [2] about the "generational" GC of Lua 5.4.
> 
> Results for the script above:
> 
> 
> The "generational" GC from github [3] perform 40% faster than the standard GC. 
> 
> Someone versed in GC magics could discuss about the changes made from 5.2 to github version of GC?
> 

I’m confused by this. First, you say that gtihub is 40% faster, but quote no times? Second, what are your expectations of the GC in Lua? Pretty much all you have done is noticed that the GC has not run during the second “for” loop. So what? Why did you expect it to?

—Tim