summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/hybrid/benchmark-1.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-05-14 19:58:50 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-05-14 19:58:50 +0200
commitfd0c4577a4b6e85ca2db664906e1a03807ce133f (patch)
treefa23fcc04248d03ff82e34634b8ef1bb9cf28acb /doc/context/sources/general/manuals/hybrid/benchmark-1.tex
parentdb581096187dc2d3cbdbe4cdc39d247c168b1607 (diff)
downloadcontext-fd0c4577a4b6e85ca2db664906e1a03807ce133f.tar.gz
2017-05-14 19:15:00
Diffstat (limited to 'doc/context/sources/general/manuals/hybrid/benchmark-1.tex')
-rw-r--r--doc/context/sources/general/manuals/hybrid/benchmark-1.tex39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/context/sources/general/manuals/hybrid/benchmark-1.tex b/doc/context/sources/general/manuals/hybrid/benchmark-1.tex
new file mode 100644
index 000000000..adb89dbc7
--- /dev/null
+++ b/doc/context/sources/general/manuals/hybrid/benchmark-1.tex
@@ -0,0 +1,39 @@
+\setupbodyfont[dejavu]
+
+\starttext
+
+\dontcomplain
+
+\startluacode
+ if jit then
+ jit.on()
+ jit.off()
+ end
+\stopluacode
+
+\startluacode
+ statistics.starttiming()
+\stopluacode
+
+\dorecurse {10} {
+ \dorecurse{1000} {
+ \dontleavehmode
+ \startMPcode
+ for i=1,100 :
+ draw
+ fullcircle scaled 10pt
+ withpen pencircle xscaled 2 yscaled 4 rotated 20 ;
+ endfor ;
+ \stopMPcode
+ \enspace
+ }
+ \page
+}
+
+\startluacode
+ statistics.stoptiming()
+ context(statistics.elapsedtime())
+\stopluacode
+
+\stoptext
+