2 Some Time Trails for the JSON4Lua package
8 local skipDecode
= (...) == '--skipDecode'
9 local count
= tonumber(select(2, ...) or 500) or 500
10 local strDup
= tonumber(select(3, ...) or 1) or 1
20 t
[#t
+ 1] = string.rep("VALUE", strDup
)
23 if not skipDecode
then v
= json
.decode(jstr
) end
24 --print(json.encode(t))
31 local idx
= string.rep('a'..j
, strDup
)
35 t
[idx
] = json
.util
.null
39 t
[idx
] = string.char(j
% 0xFF)
43 if not skipDecode
then v
= json
.decode(jstr
) end
50 print ("Elapsed time=" .. os
.difftime(t2
,t1
) .. "s")