Measured speed, memory, and binary size
Every number comes from one Apple M1, and Weavon writes the same bytes as Pandoc 3.13 in every timed case.
Weavon, Carta, ferrodoc, and Pandoc on one computer
Weavon was the fastest of the four in every case, with the same bytes as Pandoc 3.13.
- Weavon 0.1.011 of 11 exact
- Carta 0.0.164 of 11
- ferrodoc 1.0.13 of 11
- Pandoc 3.13Reference
Speed
Markdown to HTML, 1 MB input
CommonMark to JSON, 1 MB input
HTML to JSON, 1 MB input
JSON to JSON, 1 MB input
JSON to HTML, 1 MB input
JSON to HTML, no highlighting, 1 MB input
JSON to LaTeX, 1 MB input
JSON to LaTeX, no highlighting, 1 MB input
Markdown to HTML, no highlighting, 1 MB input
LaTeX to JSON, 1 MB input
DOCX to JSON, 106 KB input
Peak Memory
Markdown to HTML, 1 MB input
CommonMark to JSON, 1 MB input
HTML to JSON, 1 MB input
JSON to JSON, 1 MB input
JSON to HTML, 1 MB input
JSON to HTML, no highlighting, 1 MB input
JSON to LaTeX, 1 MB input
JSON to LaTeX, no highlighting, 1 MB input
Markdown to HTML, no highlighting, 1 MB input
LaTeX to JSON, 1 MB input
DOCX to JSON, 106 KB input
Binary Size
Release binary size
Pandoc Parity
Byte-equal cases against Pandoc 3.13
Full table and method
All four programs ran in one quiet session on the same Apple M1, and each output was compared with Pandoc byte for byte. Carta matched Pandoc in 4 cases, and ferrodoc 1.0.1 in 3.
| Conversion | Weavon 0.1.0 | Carta 0.0.16 | ferrodoc 1.0.1 | Pandoc 3.13 |
|---|---|---|---|---|
| CommonMark to JSON, 1 MB | 23.9 ms, 36.9 MiB, same bytes | 32.5 ms, 49.6 MiB, same bytes | 37.5 ms, 47.2 MiB, differs | 718.3 ms, 229.3 MiB, reference |
| HTML to JSON, 1 MB | 18.2 ms, 21.3 MiB, same bytes | 23.4 ms, 39.7 MiB, differs | 43.0 ms, 38.1 MiB, differs | 721.4 ms, 373.2 MiB, reference |
| JSON to JSON, 1 MB | 6.0 ms, 10.1 MiB, same bytes | 8.4 ms, 11.3 MiB, same bytes | 10.7 ms, 11.2 MiB, same bytes | 122.2 ms, 141.4 MiB, reference |
| JSON to HTML, 1 MB | 10.1 ms, 10.8 MiB, same bytes | 16.5 ms, 15.4 MiB, differs | 31.4 ms, 14.9 MiB, differs | 232.9 ms, 155 MiB, reference |
| JSON to HTML, no highlighting, 1 MB | 7.9 ms, 10 MiB, same bytes | 9.6 ms, 11.7 MiB, differs | 28.0 ms, 14.6 MiB, differs | 188.4 ms, 149.3 MiB, reference |
| JSON to LaTeX, 1 MB | 12.5 ms, 10.8 MiB, same bytes | 18.9 ms, 15.7 MiB, same bytes | 15.0 ms, 11.2 MiB, same bytes | 211.2 ms, 153.7 MiB, reference |
| JSON to LaTeX, no highlighting, 1 MB | 10.4 ms, 10.2 MiB, same bytes | 11.7 ms, 12.2 MiB, same bytes | 14.5 ms, 10.9 MiB, same bytes | 190.9 ms, 151.9 MiB, reference |
| Markdown to HTML, 1 MB | 53.6 ms, 29.2 MiB, same bytes | 77.7 ms, 54.6 MiB, differs | 192.7 ms, 82.9 MiB, differs | 2,264.4 ms, 262.2 MiB, reference |
| Markdown to HTML, no highlighting, 1 MB | 44.7 ms, 28.2 MiB, same bytes | 60.4 ms, 51.2 MiB, differs | 170.8 ms, 84.5 MiB, differs | 2,063.5 ms, 249.5 MiB, reference |
| LaTeX to JSON, 1 MB | 22.0 ms, 36.4 MiB, same bytes | 38.6 ms, 38 MiB, differs | Not run | 559.5 ms, 152.5 MiB, reference |
| DOCX to JSON, 106 KB | 51.3 ms, 32.9 MiB, same bytes | 90.5 ms, 120.3 MiB, differs | 115.1 ms, 55.7 MiB, differs | 1,747.2 ms, 463.2 MiB, reference |
- All three Rust programs ran syntax highlighting (Carta staged with its 4.85 MB syntax directory), and their highlighted code blocks matched Pandoc 3.13 byte for byte in each case.
- With --mathml, Carta writes the same JSON to HTML bytes as Pandoc 3.13 and Weavon is 1.67x faster with highlighting on and 1.22x faster with highlighting off.
- Weavon wins all 11 cases in minimum wall time, median wall time, peak RSS, and instructions retired against both Carta 0.0.16 and Pandoc 3.13, and wins all 10 supported cases against ferrodoc 1.0.1.
- On the three tightest memory cases, 5 interleaved
/usr/bin/time -lruns confirm the peak RSS medians with zero overlap (JSON to LaTeX 10.83 vs 11.22 and 15.69 MiB, JSON to LaTeX no highlighting 10.16 vs 10.88 and 12.20 MiB, LaTeX to JSON 36.39 vs 37.97 MiB). - On cold start (--version), Weavon takes 2.65 ms and 2.5 MiB RSS, beating Carta 0.0.16 (2.74 ms, 3.4 MiB) and Pandoc 3.13 (29.94 ms, 36.7 MiB), while ferrodoc 1.0.1 starts in 2.20 ms (2.3 MiB) because it omits the LaTeX reader, Lua 5.4.8, citeproc, PDF, Office, and the HTTP server.
- A C posix_spawn and wait4 runner with 2 warm-up runs and 21 interleaved timed runs rotating tool order each round (3 timed runs for Pandoc 3.13). Measured on a quiet machine with load average 3.15 at start and 2.25 at end.
- Stripped ARM64 binaries of Weavon 0.1.0 (dist, 9.38 MB stripped, 9.43 MB shipped before strip), Carta 0.0.16 (11.52 MB binary plus its required 4.85 MB syntax directory), ferrodoc 1.0.1 (4.92 MB, narrower scope), and Pandoc 3.13 (195.35 MB).
Wall time on 1 MB documents
Weavon is 11.3 to 46.1 times faster than Pandoc 3.13, with process start included.
- Weavon
- Pandoc 3.13
Table and method
| Conversion | Weavon | Pandoc 3.13 | Speedup | Weavon peak RSS | Pandoc peak RSS |
|---|---|---|---|---|---|
| Startup (--version) | 2.6 ms | 29.9 ms | 11.3x | 2.5 MiB | 36.7 MiB |
| CommonMark to JSON | 23.9 ms | 718.3 ms | 30.1x | 36.9 MiB | 229.3 MiB |
| HTML to JSON | 18.2 ms | 721.4 ms | 39.7x | 21.3 MiB | 373.2 MiB |
| JSON to JSON | 6.0 ms | 122.2 ms | 20.3x | 10.1 MiB | 141.4 MiB |
| JSON to HTML | 10.1 ms | 232.9 ms | 23.2x | 10.8 MiB | 155.0 MiB |
| JSON to HTML, no highlighting | 7.9 ms | 188.4 ms | 23.9x | 10.0 MiB | 149.3 MiB |
| JSON to LaTeX | 12.5 ms | 211.2 ms | 16.8x | 10.8 MiB | 153.7 MiB |
| JSON to LaTeX, no highlighting | 10.4 ms | 190.9 ms | 18.4x | 10.2 MiB | 151.9 MiB |
| Markdown to HTML | 53.6 ms | 2,264.4 ms | 42.2x | 29.2 MiB | 262.2 MiB |
| Markdown to HTML, no highlighting | 44.7 ms | 2,063.5 ms | 46.1x | 28.2 MiB | 249.5 MiB |
| LaTeX to JSON | 22.0 ms | 559.5 ms | 25.4x | 36.4 MiB | 152.5 MiB |
| DOCX (106 KB) to JSON | 51.3 ms | 1,747.2 ms | 34.1x | 32.9 MiB | 463.2 MiB |
- The computer is a MacBookPro17,1, Apple M1, 16 GiB memory, quiet machine (load average 3.15 to 2.25), with macOS 27.0.1 (arm64).
- Weavon uses the stripped dist profile (9.38 MB stripped, 9.43 MB shipped before strip) with opt-level z default, opt-level s on 11 hot crates, opt-level 3 on zlib-rs, fat LTO, one codegen unit, macOS 12.0 deployment target, and panic abort (exit code 62 on internal error, also used by the published container image). The dist-lib profile keeps panic unwind for the C ABI, Python bindings, and source-built Docker images, while Node bindings run the dist WebAssembly module.
- The Pandoc program is pandoc 3.13, the official arm64 macOS release binary, run with env -u GHCRTS.
- 2 warm-up runs, then 21 interleaved timed runs through posix_spawn rotating tool order each round (3 timed runs for Pandoc 3.13). Peak RSS and instructions retired come from
/usr/bin/time -l, with 5-run interleaved medians confirming the 3 tightest memory cases. - Each stripped binary ran from
/tmpon APFS with inputs staged locally. The--compat=pandoc-3.13output is byte-equal to Pandoc 3.13 in all 11 conversion cases. - Cold start (--version) takes 2.65 ms minimum (2.85 ms median) and 2.5 MiB RSS, beating Carta 0.0.16 (2.74 ms, 3.4 MiB) and Pandoc 3.13 (29.94 ms, 36.7 MiB).
Real-document corpus
230 real documents in 3 formats, built in parallel and checked byte for byte.
| Mode | Jobs | Program | CPU seconds | Elapsed wall seconds | Documents per second | Max peak MiB | Equal outputs |
|---|---|---|---|---|---|---|---|
| sequential | 1 | Weavon | 5.82 | 6.93 | 31.00 | 123.1 | 645 / 690 |
| sequential | 1 | Pandoc | 73.73 | 83.32 | 2.58 | 283.4 | 645 / 690 |
| parallel | 4 | Weavon | 5.65 | 1.64 | 131.31 | 123.2 | 645 / 690 |
| parallel | 4 | Pandoc | 109.75 | 34.00 | 6.32 | 283.3 | 645 / 690 |
How the corpus counts errors
Both programs stop with the same parse error (exit code 64) on 15 LaTeX documents in each of the 3 formats. These 45 conversions do not count as equal outputs in this table. All 645 other conversions give the same bytes. The corpus suite counts the 45 equal errors as passes and gives 690 of 690.
Peak memory
Weavon uses 10.0 MiB to 36.9 MiB of peak memory on 1 MB inputs, and Pandoc uses 141.4 MiB to 463.2 MiB.
Program and bundle size
- 9.38 MBWeavon stripped binary (9.43 MB before strip)
- 186.3 MiBPandoc program
- 1.86 MiBCore browser bundle, gzipped
- 2.04 MiBBrowser bundle with PDF, gzipped
Exact sizes
| Build | Bytes | MiB |
|---|---|---|
| Weavon v0.1.0 (dist, stripped ARM64, 9.43 MB before strip) | 9,377,504 | 8.94 |
| Carta 0.0.16 (binary only) | 11,523,152 | 10.99 |
| Carta 0.0.16 (binary plus syntax directory) | 16,372,808 | 15.61 |
| ferrodoc 1.0.1 (narrower scope) | 4,915,952 | 4.69 |
| Weavon earlier dist build (panic unwind) | 13,299,456 | 12.68 |
| Pandoc 3.13 release binary | 195,352,064 | 186.30 |
The embedded data, including all 194 syntax definitions, CSL styles, locales, and templates, is compressed inside the program and unpacked on first use. The dist CLI and the published Docker image set panic abort (exit code 62 on internal error), dist-lib keeps panic unwind for the C ABI, Python bindings, and source-built Docker images, and Node bindings run the dist WebAssembly module.
| Bundle | Raw bytes | gzip -9 bytes |
|---|---|---|
| Core (Markdown and HTML, dist) | 4,415,781 | 1,952,445 |
| Core plus PDF (dist, --features pdf) | 4,899,614 | 2,133,909 |
| Core (Markdown and HTML, dist-wasm) | 3,995,659 | 1,798,658 |
In Node.js v22.23.2, the dist WebAssembly core bundle converts 100 KB Markdown to HTML in 9.62 ms and 100 KB CommonMark to HTML in 6.48 ms, while adding the pdf feature gives 2.04 MiB gzipped.
Conversion in one process
Paired library calls of weavon::pipeline::convert_bytes from 2026-12-01 show about 9 ms of process-start and file-read overhead avoided in process.
| Conversion | In one process | Command line |
|---|---|---|
| CommonMark to JSON | 26.1 ms | 36.4 ms |
| HTML to JSON | 23.4 ms | 32.3 ms |
| JSON to HTML | 13.2 ms | 22.2 ms |
| JSON to LaTeX | 11.7 ms | 20.6 ms |
Release 0.1.0 measurement in CPU time
CPU time is the user time plus the system time, and it changes less than wall time on a busy machine.
| Measurement | Weavon | Pandoc | Weavon to Pandoc ratio |
|---|---|---|---|
| Startup, --version, median CPU | 2.73 ms | 18.36 ms | 0.149 |
| Startup, empty Markdown to HTML, median CPU | 3.33 ms | 19.19 ms | 0.173 |
| Markdown to HTML, 1.29 MB input, median CPU | 556.6 ms | 3,103.1 ms | 0.179 |
| JSON to HTML, 8.19 MB input, median CPU | 245.9 ms | 1,686.7 ms | 0.143 |
| Corpus, 690 conversions in sequence, CPU | 5.82 s | 73.73 s | 0.079 |
| Corpus, median peak memory of one conversion | 7.2 MiB | 109.3 MiB | 0.065 |
Each benchmark
Other programs ran during the measurement. The load average was 3.5 to 9.5 on 8 cores. Each benchmark has at least 15 timed runs of each program in alternating order. The input doc-xN repeats one Markdown section N times, and the tool reports a ratio with its 95% confidence interval only when the two outputs are equal.
| Benchmark | Input bytes | Weavon median CPU | Pandoc median CPU | Weavon to Pandoc ratio (95% CI) | Weavon peak MiB, median and max | Pandoc peak MiB, median and max | Equal output |
|---|---|---|---|---|---|---|---|
startup-version | 0 | 2.73 | 18.36 | n/a | 2.9 / 2.9 | 36.6 / 36.7 | No |
startup-empty-html | 0 | 3.33 | 19.19 | 0.173 (0.166 to 0.178) | 4.5 / 4.6 | 40.0 / 40.0 | Yes |
md-to-html-startup | 0 | 3.36 | 19.27 | 0.174 (0.171 to 0.176) | 4.5 / 4.6 | 40.0 / 40.0 | Yes |
md-to-html-x10 | 12,681 | 9.62 | 69.49 | 0.138 (0.136 to 0.140) | 10.5 / 10.7 | 115.1 / 115.2 | Yes |
md-to-html-x100 | 127,712 | 57.97 | 347.64 | 0.166 (0.161 to 0.169) | 34.4 / 34.6 | 136.2 / 136.2 | Yes |
md-to-html-x1000 | 1,287,823 | 556.58 | 3103.08 | 0.179 (0.174 to 0.180) | 252.0 / 254.3 | 320.2 / 320.2 | Yes |
md-to-html-standalone-startup | 0 | 7.20 | 35.21 | 0.203 (0.199 to 0.208) | 6.0 / 6.0 | 108.3 / 108.3 | Yes |
md-to-html-standalone-x10 | 12,681 | 13.95 | 72.44 | 0.190 (0.186 to 0.193) | 11.9 / 12.0 | 116.6 / 116.6 | Yes |
md-to-html-standalone-x100 | 127,712 | 66.87 | 361.62 | 0.184 (0.182 to 0.187) | 40.5 / 40.6 | 136.6 / 136.7 | Yes |
md-to-html-standalone-x1000 | 1,287,823 | 623.61 | 3238.52 | 0.192 (0.182 to 0.194) | 305.5 / 306.3 | 354.7 / 354.7 | Yes |
md-to-latex-startup | 0 | 3.33 | 18.84 | 0.175 (0.169 to 0.183) | 4.6 / 4.6 | 38.9 / 38.9 | Yes |
md-to-latex-x10 | 12,681 | 9.28 | 66.20 | 0.138 (0.135 to 0.141) | 10.3 / 10.4 | 114.8 / 114.8 | Yes |
md-to-latex-x100 | 127,712 | 53.98 | 325.03 | 0.166 (0.160 to 0.167) | 33.4 / 33.6 | 130.8 / 130.8 | Yes |
md-to-latex-x1000 | 1,287,823 | 507.06 | 2857.84 | 0.178 (0.175 to 0.180) | 240.9 / 241.3 | 297.8 / 297.9 | Yes |
md-to-docx-startup | 0 | 4.74 | 32.47 | n/a | 6.9 / 7.0 | 64.6 / 64.6 | No |
md-to-docx-x10 | 12,681 | 10.48 | 85.96 | n/a | 11.1 / 11.2 | 119.3 / 119.3 | No |
md-to-docx-x100 | 127,712 | 55.45 | 383.96 | n/a | 28.6 / 28.7 | 143.3 / 143.3 | No |
md-to-docx-x1000 | 1,287,823 | 521.20 | 3345.42 | n/a | 197.0 / 197.1 | 453.3 / 453.4 | No |
md-to-json-startup | 0 | 3.30 | 18.76 | 0.172 (0.169 to 0.181) | 4.5 / 4.5 | 38.5 / 38.5 | Yes |
md-to-json-x10 | 12,681 | 7.41 | 50.00 | 0.146 (0.143 to 0.150) | 8.3 / 8.5 | 109.6 / 109.6 | Yes |
md-to-json-x100 | 127,712 | 39.24 | 240.00 | 0.163 (0.161 to 0.165) | 24.2 / 24.4 | 117.6 / 117.7 | Yes |
md-to-json-x1000 | 1,287,823 | 371.83 | 1996.43 | 0.186 (0.184 to 0.189) | 169.3 / 169.7 | 201.6 / 201.7 | Yes |
json-to-html-startup | 55 | 3.36 | 19.38 | 0.174 (0.169 to 0.181) | 4.4 / 4.4 | 39.9 / 39.9 | Yes |
json-to-html-x10 | 81,722 | 6.46 | 55.01 | 0.115 (0.111 to 0.119) | 8.8 / 8.9 | 115.0 / 115.0 | Yes |
json-to-html-x100 | 817,714 | 26.95 | 202.35 | 0.133 (0.121 to 0.135) | 27.0 / 27.8 | 137.0 / 137.0 | Yes |
json-to-html-x1000 | 8,188,326 | 245.93 | 1686.74 | 0.143 (0.137 to 0.146) | 227.7 / 227.8 | 328.0 / 328.0 | Yes |
md-to-html-lua-identity-startup | 0 | 5.51 | 21.49 | 0.252 (0.245 to 0.259) | 7.2 / 7.3 | 44.0 / 44.0 | Yes |
md-to-html-lua-identity-x10 | 12,681 | 13.86 | 88.23 | 0.156 (0.152 to 0.159) | 13.6 / 13.8 | 116.2 / 116.3 | Yes |
md-to-html-lua-identity-x100 | 127,712 | 80.68 | 511.40 | 0.158 (0.152 to 0.159) | 40.8 / 44.7 | 138.4 / 138.4 | Yes |
md-to-html-lua-identity-x1000 | 1,287,823 | 782.34 | 4887.11 | 0.159 (0.155 to 0.163) | 295.7 / 333.6 | 331.0 / 331.0 | Yes |
md-to-html-highlight-startup | 0 | 3.37 | 19.39 | 0.174 (0.164 to 0.177) | 4.5 / 4.6 | 40.2 / 40.2 | Yes |
md-to-html-highlight-x10 | 11,150 | 13.06 | 57.06 | 0.227 (0.222 to 0.230) | 7.9 / 7.9 | 68.7 / 68.7 | Yes |
md-to-html-highlight-x100 | 111,500 | 94.94 | 382.88 | 0.248 (0.236 to 0.251) | 17.2 / 17.3 | 173.0 / 173.0 | Yes |
- startup-version prints the name and the licence of Weavon. This difference is deliberate.
- md-to-docx compares
word/document.xml. The two files are equal after the removal of the whitespace between tags. The other DOCX parts come from the reference document of Weavon, which does not copy the GPL reference document of Pandoc.
Run the benchmarks yourself
docs/BENCHMARKS.md has the commands, the statistics, and the raw data.
python3 tools/bench/make_inputs.py --oracle "$WEAVON_ORACLE_PANDOC" --out-dir BENCH/inputs
cp benchmarks/launch.toml BENCH/launch.toml
cargo build --profile dist -p weavon-cli
env -u GHCRTS python3 tools/bench/run.py --program target/dist/weavon \
--compare "$WEAVON_ORACLE_PANDOC" --expect-equal --runs 15 --max-runs 30 \
--benchmarks BENCH/launch.toml --out benchmarks/results/0.1.0-macos-arm64.json
