The following MWE, compiled under several situations (with appropriate lines removed) gives the following timings (with all output files removed between runs), as timed by Measure-Command
on Windows 7 Powershell with TL2014:
Engine | unicode-math? | sisetup options | Time
-------------------------------------------------------------------
lualatex | unicode-math | per-mode=symbol-or-fraction | ~53 sec
lualatex | unicode-math | per-mode=default | ~5 sec
lualatex | no unicode-math | per-mode=symbol-or-fraction | ~2 sec
lualatex | fontspec | per-mode=symbol-or-fraction | ~4 sec
xelatex | unicode-math | per-mode=symbol-or-fraction | ~4 sec
xelatex | no unicode-math | per-mode=symbol-or-fraction | ~2 sec
pdflatex | no unicode-math | per-mode=default | ~1 sec
pdflatex | no unicode-math | per-mode=symbol-or-fraction | ~1 sec
--------------------------------------------------------------------
Why does adding the per-mode=symbol-or-fraction
with unicode-math
increase the compile time by an order of magnitude in lualatex
?
Binary versions:
LuaTeX, Version beta-0.79.1 (rev 4971)
XeTeX 3.14159265-2.6-0.99991
pdfTeX 3.14159265-2.6-1.40.15
\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\usepackage{siunitx}
\sisetup{
per-mode = symbol-or-fraction,
}
\begin{document}
\begin{align*}
\text{at $p=\SI{1.0}{\MPa}$:}\begin{cases}
v(T) &= v_1 + \left(T - T_1\right)\frac{v_2 - v_1}{T_2 - T_1} \\
v(\SI{220}{\degreeCelsius}) &= \SI{0.2060}{\meter\cubed\per\kilogram} + \left(\SI{220}{\degreeCelsius} - \SI{200}{\degreeCelsius}\right) \frac{\SI{0.2275}{\meter\cubed\per\kilogram} - \SI{0.2060}{\meter\cubed\per\kilogram}}{\SI{240}{\degreeCelsius} - \SI{200}{\degreeCelsius}} \\
v(\SI{220}{\degreeCelsius}) &= \SI{0.21675}{\meter\cubed\per\kilogram}
\end{cases}\\
\text{at $p=\SI{1.5}{\MPa}$:}\begin{cases}
v(T) &= v_1 + \left(T - T_1\right)\frac{v_2 - v_1}{T_2 - T_1} \\
v(\SI{220}{\degreeCelsius}) &= \SI{0.1325}{\meter\cubed\per\kilogram} + \left(\SI{220}{\degreeCelsius} - \SI{200}{\degreeCelsius}\right) \frac{\SI{0.1483}{\meter\cubed\per\kilogram} - \SI{0.1325}{\meter\cubed\per\kilogram}}{\SI{240}{\degreeCelsius} - \SI{200}{\degreeCelsius}} \\
v(\SI{220}{\degreeCelsius}) &= \SI{0.1404}{\meter\cubed\per\kilogram}
\end{cases}\\
\text{at $T=\SI{220}{\degreeCelsius}$:}\begin{cases}
v(p) &= v_1 + \left(p - p_1\right)\frac{v_2 - v_1}{p_2 - p_1} \\
v(\SI{1.4}{\MPa}) &= \SI{0.21675}{\meter\cubed\per\kilogram} + \left(\SI{1.4}{\MPa} - \SI{1.0}{\MPa}\right) \frac{\SI{0.1404}{\meter\cubed\per\kilogram} - \SI{0.21675}{\meter\cubed\per\kilogram}}{\SI{1.5}{\MPa} - \SI{1.0}{\MPa}} \\
v(\SI{1.4}{\MPa}) &= \SI{0.1557}{\meter\cubed\per\kilogram}
\end{cases}
\end{align*}
\end{document}
unicode-math
package loaded, I get a compile time of between 5 and 6 seconds with theper-mode=symbol-or-fraction
set. Without that option, it takes between 1 and 2 seconds to compile. – Mico Feb 5 '15 at 20:40per-mode=symbol-or-fraction
is dramatic. – Ulrike Fischer Feb 6 '15 at 10:48\mathchoice
, so typesets everything four times (display, text, script, scriptscript). – Joseph Wright♦ Feb 6 '15 at 19:09