[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:32:49 +0200
it became broken, the {func2, {params...}}, ...) part is the end of
the first line, as it is only the usage...
2017-07-03 21:30 GMT+02:00 szbnwer@gmail.com <szbnwer@gmail.com>:
> 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