[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "String builder"-style optimization
- From: "szbnwer@..." <szbnwer@...>
- Date: Mon, 3 Jul 2017 21:30:51 +0200
you can use this for all of your performance related questions :D
benchMark=function(turns, ...) -- (1000000, {func1, {params...}},
{func2, {params...}}, ...)
local res={}
for i=1, select('#', ...) do
local current=select(i, ...)
local start=os.time()
for j=1, turns do
current[1](unpack(current[2])) end
res[i]=os.difftime(os.time(), start) end
return res end