lua-users home
lua-l archive

Re: [ANN] Lua 5.4.0 (work2) now available

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


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?
 $ 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

Attachment: bechmark_performance.gif
Description: GIF image


AltStyle によって変換されたページ (->オリジナル) /