mirror of
https://github.com/gvx/bitser.git
synced 2024-11-24 06:54:20 +00:00
Bug fix: actually make different tries in benchmark useful
This commit is contained in:
parent
348511c702
commit
eb4c65ffcf
6
main.lua
6
main.lua
@ -106,11 +106,14 @@ function love.draw()
|
||||
resultname = "serialisation time in seconds"
|
||||
results_size = {}
|
||||
results_deser = {}
|
||||
for sername, serializer in pairs(sers) do
|
||||
results_ser[sername] = math.huge
|
||||
results_deser[sername] = math.huge
|
||||
end
|
||||
local outputs = {}
|
||||
for try = 1, tries do
|
||||
for sername, serializer in pairs(sers) do
|
||||
local output
|
||||
results_ser[sername] = math.huge
|
||||
local t = os.clock()
|
||||
for i = 1, iters do
|
||||
output = serializer(data)
|
||||
@ -129,7 +132,6 @@ function love.draw()
|
||||
for try = 1, tries do
|
||||
for sername, deserializer in pairs(desers) do
|
||||
local input = outputs[sername]
|
||||
results_deser[sername] = math.huge
|
||||
local t = os.clock()
|
||||
for i = 1, iters / 10 do
|
||||
deserializer(input)
|
||||
|
Loading…
Reference in New Issue
Block a user