lua-users home
lua-l archive

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


On 01/06/2019 06.47, nobody wrote:
> On 01/06/2019 03.31, Soni "They/Them" L. wrote:
>>> local num_iterations = 1e8
>>> local table_width = 1e8
>> is this measuring GC performance or RNG performance?
> 
> Neither.
> 
> With these settings, roughly 75% of the slots get at most 1 assignment,
> or only about 25% of the tables will become garbage. >98% of the slots
> are assigned to less than 4 times – GC is bored.  And the RNG just gets lost in
> the noise of 1e8 table creations and all that entails…
> 
> -- nobody
> 

I'm using same code that were too slow for "5.4.0-work2".
Here is link to my message: https://marc.info/?l=lua-l&m=152985309714067

Point is this test took 76 seconds for Lua 5.4.0-work2
while on 5.3.4 it executed in 38 seconds.

Now execution times between "5.3.5" and "5.4.0-alpha"
almost match.

RNG here is used to avoid possible optimizations for
sequential indexes in virtual machine.

Also execution time spent not only for garbage collection
but also for tables allocation.

In other words: this is ad hoc test. No matter what it
does, it should not be slower in new Lua version.

-- Martin