Skip to content

Commit 07c1d3c

Browse files
committed
Fix benchmarks
1 parent aab4f64 commit 07c1d3c

File tree

6 files changed

+3018
-4
lines changed

6 files changed

+3018
-4
lines changed

bench/bench_decode.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ for i, name in ipairs(libs) do
6363
end
6464

6565
-- Warmup (for LuaJIT)
66-
bench.run(name, 1, function() json.decode(text) end)
66+
bench.run(name, 10, function() json.decode(text) end)
6767

6868
-- Run and push results
69-
local res = bench.run(name, 10, function() json.decode(text) end)
69+
local res = bench.run(name, 100, function() json.decode(text) end)
7070
table.insert(results, res)
7171
end
7272

bench/bench_encode.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ for i, name in ipairs(libs) do
5151
end
5252

5353
-- Warmup (for LuaJIT)
54-
bench.run(name, 1, function() json.encode(data) end)
54+
bench.run(name, 10, function() json.encode(data) end)
5555

5656
-- Run and push results
57-
local res = bench.run(name, 10, function() json.encode(data) end)
57+
local res = bench.run(name, 100, function() json.encode(data) end)
5858
table.insert(results, res)
5959
end
6060

0 commit comments

Comments
 (0)