From eb4c65ffcf300b4a98eb5cea952665f97bf2270c Mon Sep 17 00:00:00 2001 From: Robin Wellner Date: Tue, 16 Feb 2016 14:38:01 +0100 Subject: [PATCH] Bug fix: actually make different tries in benchmark useful --- main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.lua b/main.lua index 8e7202c..3b43e14 100644 --- a/main.lua +++ b/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)