On Sun, Mar 20, 2011 at 1:33 AM, Henning Diedrich
<hd2010@eonblast.com> wrote:
make bench7a
here it is for you:
% make bench7a
lua test/bench7a.lua
Fleece Benchmarks for ESCAPE characters
=======================================
A couple of random tables are created, with escape characters and speed is clocked.
You should have built fleece first with 'make <PLATFORM>',
and now be in the fleece root directory.
Lua 5.1 official - Fleece 0.3.1
Integer Conversion
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 57ns/element [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23..
1000x fleece.json(t, "E1") 56ns/element [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23..
1000x fleece.json(t, "E2") 56ns/element [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23..
1000x fleece.json(t, "E3") 56ns/element [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23..
1000x fleece.json(t, "E4") 56ns/element [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23..
--------------------------------------------------------------------------------------------------------------------
Frequency of escape characters 1 in 4
--------------------------------------------------------------------------------------------------------------------
","rx fleece.json(t, "E0") 73ns/element ["ya","kr<t l
m","k\n","fy
"," pwpeoo","owme","..
","rx fleece.json(t, "E1") 122ns/element ["ya","kr<t l
m","k*n","fy
"," pwpeoo","owme","..
","rx fleece.json(t, "E2") 138ns/element ["ya","kr<t l
m","k\\n","fy
"," pwpeoo","owme",..
","rx fleece.json(t, "E3") 141ns/element ["ya","kr<t l
m","k\\n","fy
"," pwpeoo","owme",..
1000x fleece.json(t, "E4") 258ns/element ["\u007fya","kr\u0001<t\tl\r","r\fm","k\\n","fy\nrti\r","\tp..
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 133ns/element {"z\a<ss":"
muet\nb\","fmyg\":g","oj
m":"nvwajsuqj","..
1000x fleece.json(t, "E1") 229ns/element {"z*a<ss":"
muet*nb*","fmyg*":g","oj
m":"nvwajsuqj","..
1000x fleece.json(t, "E2") 260ns/element {"z\\a<ss":"
muet\\nb\\","fmyg\\":g","oj
m":"nvwajsuq..
1000x fleece.json(t, "E3") 261ns/element {"z\\a<ss":"
muet\\nb\\","fmyg\\":g","oj
m":"nvwajsuq..
1000x fleece.json(t, "E4") 495ns/element {"z\\a<\u0001ss":"\t\nmuet\\nb\\","fmyg\\":"\bgf\b","oj\fm":..
--------------------------------------------------------------------------------------------------------------------
Frequency of escape characters 1 in 10
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 73ns/element ["wi","dgir","kbwni","bntb","v","<diymdsae","a","juinura","..
1000x fleece.json(t, "E1") 117ns/element ["wi","dgir","kbwni","bntb","v","<diymdsae","a","juinura","..
1000x fleece.json(t, "E2") 122ns/element ["wi","dgir","kbwni","bntb","v","<diymdsae","a","juinura","..
1000x fleece.json(t, "E3") 125ns/element ["wi","dgir","kbwni","bntb","v","<diymdsae","a","juinura","..
1000x fleece.json(t, "E4") 179ns/element ["wi","dgir","kbwni","bntb","v","<diymds\u007fae","a","juinu..
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 131ns/element {"xvqqwty"":" jijun<sg","crmp":"ck lue
d","y
l":"nirnhj",..
1000x fleece.json(t, "E1") 219ns/element {"xvqqwty*":" jijun<sg","crmp":"ck lue
d","y
l":"nirnhj",..
1000x fleece.json(t, "E2") 228ns/element {"xvqqwty\"":" jijun<sg","crmp":"ck lue
d","y
l":"nirnhj"..
1000x fleece.json(t, "E3") 228ns/element {"xvqqwty\"":" jijun<sg","crmp":"ck lue
d","y
l":"nirnhj"..
1000x fleece.json(t, "E4") 336ns/element {"xvqqwty\"":"\tjijun<sg","crmp":"ck\tlue\n\fd","y\fl":"nirp..
--------------------------------------------------------------------------------------------------------------------
Frequency of escape characters 1 in 30
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 73ns/element ["vyneyzcp","ofvky","murhws","idcquzaol","hav<","ciipvsz","z..
1000x fleece.json(t, "E1") 116ns/element ["vyneyzcp","ofvky","murhws","idcquzaol","hav<","ciipvsz","z..
1000x fleece.json(t, "E2") 114ns/element ["vyneyzcp","ofvky","murhws","idcquzaol","hav<","ciipvsz","z..
1000x fleece.json(t, "E3") 118ns/element ["vyneyzcp","ofvky","murhws","idcquzaol","hav<","ciipvsz","z..
1000x fleece.json(t, "E4") 135ns/element ["vyneyzcp","ofvky","murhws","idcquzaol","hav<","ciipvsz","z..
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 132ns/element {"\nqu":"vczdupz","lljsnqwt":"zkot
","lrqfqnqfft":"mcpmq","p..
1000x fleece.json(t, "E1") 219ns/element {"*nqu":"vczdupz","lljsnqwt":"zkot
","lrqfqnqfft":"mcpmq","p..
1000x fleece.json(t, "E2") 219ns/element {"\\nqu":"vczdupz","lljsnqwt":"zkot
","lrqfqnqfft":"mcpmq","..
1000x fleece.json(t, "E3") 218ns/element {"\\nqu":"vczdupz","lljsnqwt":"zkot
","lrqfqnqfft":"mcpmq","..
1000x fleece.json(t, "E4") 261ns/element {"\\nqu":"vczdupz","lljsnqwt":"zkot\f","lrqfqnqfft":"mcpmq",..
--------------------------------------------------------------------------------------------------------------------
Frequency of escape characters 1 in 100
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 73ns/element ["fmdelc","gifuqstekx","bvwqeohwv","lbo","vldoa","eqdym","yy..
1000x fleece.json(t, "E1") 115ns/element ["fmdelc","gifuqstekx","bvwqeohwv","lbo","vldoa","eqdym","yy..
1000x fleece.json(t, "E2") 113ns/element ["fmdelc","gifuqstekx","bvwqeohwv","lbo","vldoa","eqdym","yy..
1000x fleece.json(t, "E3") 116ns/element ["fmdelc","gifuqstekx","bvwqeohwv","lbo","vldoa","eqdym","yy..
1000x fleece.json(t, "E4") 117ns/element ["fmdelc","gifuqstekx","bvwqeohwv","lbo","vldoa","eqdym","yy..
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 129ns/element {"hik":"sds","pkccccok":"yagtcibb","v szm":"bpleygom","pfwsb..
1000x fleece.json(t, "E1") 213ns/element {"hik":"sds","pkccccok":"yagtcibb","v szm":"bpleygom","pfwsb..
1000x fleece.json(t, "E2") 211ns/element {"hik":"sds","pkccccok":"yagtcibb","v szm":"bpleygom","pfwsb..
1000x fleece.json(t, "E3") 209ns/element {"hik":"sds","pkccccok":"yagtcibb","v szm":"bpleygom","pfwsb..
1000x fleece.json(t, "E4") 207ns/element {"hik":"sds","pkccccok":"yagtcibb","v\tszm":"bpleygom","pfws..
--------------------------------------------------------------------------------------------------------------------
Frequency of escape characters 1 in 1000
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 72ns/element ["ptfvbbc","f","ccm","n","we","fbbxlqish","pebmddnrrc","zzyt..
1000x fleece.json(t, "E1") 116ns/element ["ptfvbbc","f","ccm","n","we","fbbxlqish","pebmddnrrc","zzyt..
1000x fleece.json(t, "E2") 112ns/element ["ptfvbbc","f","ccm","n","we","fbbxlqish","pebmddnrrc","zzyt..
1000x fleece.json(t, "E3") 115ns/element ["ptfvbbc","f","ccm","n","we","fbbxlqish","pebmddnrrc","zzyt..
1000x fleece.json(t, "E4") 109ns/element ["ptfvbbc","f","ccm","n","we","fbbxlqish","pebmddnrrc","zzyt..
--------------------------------------------------------------------------------------------------------------------
1000x fleece.json(t, "E0") 131ns/element {"nuxnlt":"ciajpfjphw","mps":"bd","jmlu":"is","xdqszgtuce":"..
1000x fleece.json(t, "E1") 218ns/element {"nuxnlt":"ciajpfjphw","mps":"bd","jmlu":"is","xdqszgtuce":"..
1000x fleece.json(t, "E2") 213ns/element {"nuxnlt":"ciajpfjphw","mps":"bd","jmlu":"is","xdqszgtuce":"..
1000x fleece.json(t, "E3") 211ns/element {"nuxnlt":"ciajpfjphw","mps":"bd","jmlu":"is","xdqszgtuce":"..
1000x fleece.json(t, "E4") 200ns/element {"nuxnlt":"ciajpfjphw","mps":"bd","jmlu":"is","xdqszgtuce":"..
--------------------------------------------------------------------------------------------------------------------
hope it helps,
valerio