On Sun, Jun 24, 2018 at 8:11 AM, dyngeccetor8
<dyngeccetor8@disroot.org> wrote:
On 06/23/2018 05:24 AM, dyngeccetor8 wrote:
> 5.4.0 version [...]
> execution is really slower.
I've sketched artificial test to exploit slower (but economical)
garbage collector and give a try for new random().
Can someone retest it?
Raw numbers on Windows 10 - Third Gen i7 laptop
Lua 5.3:
Lua 5.4:
5.4 seems a smidgen faster.
Night,
Russ
$ time lua gc_benchmark.lua
Lua 5.3
real 0m38.009s
user 0m36.640s
sys 0m1.384s
$ time ~/Downloads/lua-5.4.0-work2/src/lua gc_benchmark.lua
Lua 5.4
real 1m17.759s
user 1m16.508s
sys 0m1.208s
-- gc_bechmark.lua (
local num_iterations = 1e8
local table_width = 1e8
print(_VERSION)
math.randomseed(os.time())
local t = {}
for i = 1, num_iterations do
local k = math.random(table_width)
t[k] = {}
end
-- )
-- Martin