lua-users home
lua-l archive

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


On 01/06/2019 04.31, Soni "They/Them" L. wrote:
> On 2019-05-31 10:12 p.m., dyngeccetor8 wrote:
> [...]
>> -- 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
>> -- )
> [...]
> 
> is this measuring GC performance or RNG performance?

GC performance. RNG execution times an orders faster.

-- Martin