summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
committerKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
commitf74161ca4e7eb3c5af9afcbe92522ae3b58987c1 (patch)
tree3c30a13df5ac7968195c85070a2b074578e669d2 /Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua
parent1d5a55ac8f5506a7ae9cfca52f4b588182e199d4 (diff)
context beta/cont-tmf.zip (Apr 16 12:55)
git-svn-id: svn://tug.org/texlive/trunk@43931 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua')
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua163
1 files changed, 163 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua b/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua
new file mode 100644
index 00000000000..ec669a2538f
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting-jit.lua
@@ -0,0 +1,163 @@
+return {
+ {
+ ["off"]="0.399",
+ ["on"]="0.081",
+ },
+ {
+ ["off"]="1.339",
+ ["on"]="0.081",
+ },
+ {
+ ["off"]="4.527",
+ ["on"]="2.817",
+ },
+ {
+ ["off"]="0.644",
+ ["on"]="0.640",
+ },
+ {
+ ["off"]="3.032",
+ ["on"]="3.007",
+ },
+ {
+ ["off"]="4.046",
+ ["on"]="4.977",
+ },
+ ["local fc = font.current\
+\
+function font.current()\
+ return fc()\
+end\
+\
+return function()\
+ local a = 0\
+ for i=1,10000 do\
+ a = a + font.current()\
+ end\
+end"]={
+ ["off"]="1.966",
+ ["on"]="2.492",
+ },
+ ["local fc = font.current\
+\
+function font.xcurrent()\
+ return fc()\
+end\
+\
+return function()\
+ local a = 0\
+ for i=1,10000 do\
+ a = a + font.xcurrent()\
+ end\
+end"]={
+ ["off"]="1.912",
+ ["on"]="1.915",
+ },
+ ["local function whatever(i)\
+ return i\
+end\
+\
+return function()\
+ local a = 0\
+ for i=1,10000 do\
+ a = a + whatever(i)\
+ end\
+end"]={
+ ["off"]="0.648",
+ ["on"]="0.042",
+ },
+ ["local tostring, tonumber = tostring, tonumber\
+return function()\
+ local a = 0\
+ for i=1,1000 do\
+ local a = a + tonumber(tostring(i))\
+ end\
+end"]={
+ ["off"]="2.620",
+ ["on"]="0.162",
+ },
+ ["local tostring, tonumber = tostring, tonumber\
+return function()\
+ local a = 0\
+ for i=1,10000 do\
+ local a = a + tonumber(tostring(i))\
+ end\
+end"]={
+ ["off"]="79.316",
+ ["on"]="5.640",
+ },
+ ["return function()\
+ local a = 0\
+ for i=1,100 do\
+ local a = a + tonumber(tostring(i))\
+ end\
+end"]={
+ ["off"]="0.703",
+ ["on"]="0.047",
+ },
+ ["return function()\
+ local a = 0\
+ for i=1,1000 do\
+ local a = a + tonumber(tostring(i))\
+ end\
+end"]={
+ ["off"]="2.607",
+ ["on"]="0.162",
+ },
+ ["return function()\
+ local a = 0\
+ for i=1,10000 do\
+ a = a + font.current()\
+ end\
+end"]={
+ ["off"]="1.292",
+ ["on"]="1.296",
+ },
+ ["return function()\
+ local a = 0\
+ for i=1,10000 do\
+ a = a + i\
+ end\
+end"]={
+ ["off"]="0.207",
+ ["on"]="0.042",
+ },
+ ["return function()\
+ local a = 0\
+ for i=1,10000 do\
+ a = a + math.sin(1/i)\
+ end\
+end"]={
+ ["off"]="2.204",
+ ["on"]="1.482",
+ },
+ ["return function()\
+ local a = 0\
+ for i=1,10000 do\
+ local a = a + tonumber(tostring(i))\
+ end\
+end"]={
+ ["off"]="79.456",
+ ["on"]="5.703",
+ },
+ ["return function()\
+ local a = 0\
+ local p = (1-lpeg.P(\"5\"))^0 * lpeg.P(\"5\")\
+ for i=1,100 do\
+ local a = a + (tonumber(lpeg.match(p,tostring(i))) or 0)\
+ end\
+end"]={
+ ["off"]="0.859",
+ ["on"]="0.843",
+ },
+ ["return function()\
+ local a = 0\
+ local p = (1-lpeg.P(\"5\"))^0 * lpeg.P(\"5\") + lpeg.Cc(0)\
+ for i=1,100 do\
+ local a = a + lpeg.match(p,tostring(i))\
+ end\
+end"]={
+ ["off"]="0.313",
+ ["on"]="0.316",
+ },
+} \ No newline at end of file