Benchmarks
How much of real-world MathML mathconv converts, and how fast. The figures describe mathconv 0.1.0a4, the release this site runs, and are regenerated with every release.
- Release
- mathconv 0.1.0a4, commit
6bd91e38daae - Coverage
- 20,000 held-out formulas of the mathconv corpus
- Speed
- measured on 2026-12-04 at commit
483efea79f45, the median of 5 runs - Machine
- one core of a GitHub-hosted ubuntu-latest runner (AMD EPYC 9V74 80-Core Processor)
Coverage
Every formula of the held-out sample is converted, then checked: whether anything was left unconverted, whether KaTeX and MathJax accept the LaTeX, and, where the source also gives its own LaTeX, whether both draw the same. How coverage is measured.
- MathML to LaTeX99.7%fully converted
- MathML to text99.8%fully converted
| From | To | Formulas | Fully converted | Accepted by KaTeX | Accepted by MathJax | Looks like author's LaTeX | Looks like normalised LaTeX |
|---|---|---|---|---|---|---|---|
| mathml | latex | 20,000 | 99.7% | 100.0% | 100.0% | 81.3% | 68.6% |
| mathml | text | 20,000 | 99.8% | - | - | - | - |
Measured on 20,000 formulas held out for testing from the mathconv corpus at revision f84cf205ba12.
Fully converted: nothing was left unconverted.
Accepted: the renderer displays the LaTeX without error.
Looks like: where the source also gives LaTeX, both look the same in MathJax.
Speed
Formulas a second on one core, through Converter.convert_batch of the Python package and through the Rust core. A continuous integration job measures every file of the benchmark set with the Rust core and with the installed wheel. How speed is measured.
- MathML to LaTeX806,479typical formulas a second,
convert_batch - MathML to text908,030typical formulas a second,
convert_batch
| Conversion | Typical, convert_batch | Typical, Rust core | Whole set, convert_batch | Whole set, Rust core |
|---|---|---|---|---|
| mathml to latex | 806,479 | 847,127 | 313,018 | 318,986 |
| mathml to text | 908,030 | 977,201 | 341,572 | 352,988 |
Typical: the real formulas of up to 60 elements in tokens-small.txt, scripts.txt, rows.txt, of which real documents are almost entirely made.
Whole set: every file below, including large tables and stress cases.
| File | Formulas | mathml to latex, Rust core | mathml to latex, convert_batch | mathml to text, Rust core | mathml to text, convert_batch |
|---|---|---|---|---|---|
content.txt | 36 | 114,962 | 113,025 | 130,490 | 127,237 |
large.txt | 26 | 14,698 | 14,769 | 15,548 | 15,441 |
malformed.txt | 87 | 1,010,803 | 948,106 | 1,132,999 | 1,052,004 |
pathological.txt | 12 | 7,556 | 7,505 | 8,306 | 8,191 |
rows.txt | 100 | 357,709 | 349,960 | 400,769 | 386,313 |
scripts.txt | 700 | 514,414 | 496,128 | 591,888 | 562,638 |
tables.txt | 22 | 30,620 | 30,443 | 32,971 | 32,559 |
tokens-small.txt | 1,200 | 1,665,294 | 1,532,092 | 1,952,854 | 1,715,328 |