context-performance.tex /size: 2984 b    last modification: 2020-07-01 14:35
1
\usemodule
[
art
-
0
1
,
abr
-
0
1
]
2 3
\starttext
4 5
\subject
{
About
performance
}
6 7
If
you
use
\PDFTEX
,
\XETEX
\
and
\LUATEX
\
you
will
notice
a
difference
in
speed
.
8
Don
'
t
draw
conclusions
too
easily
from
simple
tests
like
:
9 10
\starttyping
11
\dorecurse
{
1
0
0
0
}{
test
\page
}
12
\stoptyping
13 14
or
(
also
tests
the
file
system
)
:
15 16
\starttyping
17
\dorecurse
{
1
0
0
0
}{
\input
tufte
\blank
}
18
\stoptyping
19 20
The
wide
engines
\XETEX
\
and
\LUATEX
\
have
more
work
to
do
than
\PDFTEX
,
because
21
the
input
is
\UTF
\
and
\UNICODE
\
fonts
are
used
.
Of
course
running
\PDFTEX
\
on
22
extensive
\UTF
\
input
will
compensate
it
a
bit
.
23 24
Comparing
\XETEX
\
and
\PDFTEX
\
(
using
\MKII
)
and
\LUATEX
\
(
using
\MKIV
)
is
kind
25
of
useless
anyway
because
the
\LUATEX
\
with
\MKIV
\
combination
is
not
only
doing
26
more
advanced
things
,
which
costs
time
,
but
at
the
other
hand
has
more
efficient
27
alternatives
,
like
for
instance
using
\MPLIB
,
which
gains
a
lot
.
28 29
So
,
it
'
s
best
to
compare
speeds
with
a
mixed
content
document
:
multiple
fonts
,
30
text
and
math
,
images
,
\METAPOST
\
graphics
,
structural
components
,
tables
,
etc
.
31 32
On
the
average
\PDFTEX
\
is
the
fastest
,
but
offering
less
functionality
,
while
33
\LUATEX
\
with
\MKIV
\
is
often
faster
than
\XETEX
\
with
\MKII
.
On
complex
products
34
like
the
\METAFUN
\
manual
or
when
processing
complex
\XML
\
files
a
\LUATEX
\
is
35
much
faster
than
a
\PDFTEX
\
run
.
36 37
There
is
some
startup
time
involved
which
is
normally
not
that
much
,
and
initial
38
font
loading
is
also
not
really
a
burden
,
but
of
course
for
a
few
page
document
39
it
brings
down
the
number
of
pages
processed
per
second
.
Normalizing
the
input
40
takes
a
bit
but
applying
\OPENTYPE
\
font
features
takes
much
more
.
If
you
find
41
unacceptable
bottlenecks
just
let
me
know
(
but
better
first
check
performance
in
42
the
other
engines
)
.
Of
course
inefficient
coding
of
styles
(
massive
font
switches
43
where
a
simple
one
could
do
)
are
no
reason
for
a
complaint
.
Keep
in
mind
:
44
flexibility
comes
at
a
price
.
45 46
A
lot
of
time
went
into
making
sure
that
\CONTEXT
\
runs
efficiently
on
\LUATEX
\ 47
and
we
keep
improving
the
performance
.
This
is
not
so
much
an
engine
issue
but
48
more
one
of
the
macro
package
.
Of
course
what
is
true
for
\CONTEXT
\
\MKIV
\
can
be
49
different
for
other
macro
packages
but
comparing
with
them
makes
no
sense
because
50
the
differences
in
functionality
.
51 52
There
are
many
features
in
\CONTEXT
\
\MKIV
\
that
demand
analysis
of
the
text
53
stream
and
when
a
spot
is
found
where
that
feature
has
to
be
applied
some
actions
54
takes
place
.
Most
such
features
don
'
t
have
an
impact
on
overall
performance
(
due
55
to
the
analysis
)
unless
they
are
used
.
Of
course
font
processing
has
the
largest
56
impact
,
but
they
are
also
the
most
flexible
and
extensible
feature
,
especially
57
when
you
use
dynamic
features
.
And
font
processing
is
always
enabled
.
Speed
has
58
been
improved
over
time
and
we
'
re
currently
at
a
point
that
further
speedup
makes
59
not
much
sense
and
would
only
make
the
code
more
complex
.
This
is
not
to
say
that
60
we
cannot
improve
performance
in
the
future
.
61 62
Hans
Hagen
\crlf
Hasselt
NL
63 64
\stoptext
65