[XeTeX] XeTeX run time
jfkthame at googlemail.com
Sun Mar 15 14:05:29 CET 2009
On 15 Mar 2009, at 12:23, وفا خلیقی wrote:
> I have noticed today that for large documents, xetex run time is
> slower than tex's run time. Can the xetex run time be reduced?
Sure. Get a faster computer. :)
Seriously, it's not clear what you are comparing. Generating PDF is
much more expensive than generating DVI. (Compare pdftex in DVI mode
with pdftex in PDF mode and you'll see.) And if you're using OpenType
fonts with complex shaping behavior -- or even without -- xetex is
having to work much harder to do the layout process, interacting with
the font system; TFM files, by comparison, are a compact, TeX-
optimized form of exactly the information TeX needs.
If you run "xetex -no-pdf" to generate .xdv output, and use only
"legacy" TeX fonts with tfm files, not OpenType fonts, you'll have
something more like a meaningful comparison. And yes, xetex will still
be slower. The main reason remaining, once you eliminate PDF
generation and OpenType font processing, is that enlarging various
internal structures and tables to support the full Unicode character
set instead of just 8-bit characters gives it a much larger memory
footprint. So performance may depend very much on your system's memory
bandwidth, CPU caches, disk speed (to load the larger .fmt file) etc.
In some tests, at least, using a legacy TeX document (i.e, using tfm
fonts, etc; taking OpenType processing out of the comparison) xetex is
actually FASTER to generate PDF output than running pdftex on the same
document. This depends on having a multi-core system, though; on a
single-core cpu I can't imagine it would win.
But fundamentally, there are some things xetex does that tex doesn't
do, and they have a performance cost. Feel free to optimize. :)
(Another thought: if you didn't notice until today, I guess it can't
be too awful!)
More information about the XeTeX