RPIC

Performance

How fast does text become SVG? The benchmark below renders the same diagram — a chain of N labelled boxes joined by arrows — expressed in each tool’s own language, and times cold CLI invocations (process start to SVG written), which is what a documentation build or CI pipeline actually pays per diagram.

Cold render to SVG — chain of N labelled boxes, median time

rpic other tools
Tool5 nodes30 nodes120 nodesjitter
pikchrC1.7 ms1.9 ms
3 ms
±0.6
dpicC2.5 ms2.8 ms
3.7 ms
±0.6
rpicRust4.3 ms4.2 ms
5.3 ms
±0.8
graphviz dotCauto-layout85 ms83 ms
84 ms
±2.9
d2Goauto-layout62 ms134 ms
449 ms
±9.3
mermaidmmdc · Chromiumauto-layout537 ms582 ms
713 ms
±22.6
Apple M2 Pro · hyperfine, warmup, median of 10–454 runs · jitter is the 120-node interquartile range (lower = more deterministic) · bars are linear in the 120-node time — the near-invisible pic-family bars are the honest picture · outputs verified complete · reproduce with tools/bench
81×
faster in a docs pipeline —
50 small diagrams, rendered in sequence
rpic380 ms
mermaid (mmdc)32.1 s

That ~140× difference in the pipeline scenario is the gap between a site build you don’t notice and one you schedule around.

Point estimates hide the shape of the data, so here is the full distribution at the largest size, on a logarithmic axis — the only honest way to show a field that spans three orders of magnitude:

Render-time distribution — 120-node chain, log axis

rpic other tools
1 ms10 ms100 ms1 spikchr: median 3.0 ms · IQR 2.7 ms–3.3 ms · whiskers 1.8 ms–4.2 ms · min 1.8 ms, max 6.5 ms · n=454pikchr3.0 msdpic: median 3.7 ms · IQR 3.5 ms–4.1 ms · whiskers 2.5 ms–5.0 ms · min 2.4 ms, max 6.4 ms · n=420dpic3.7 msrpic: median 5.3 ms · IQR 5.0 ms–5.8 ms · whiskers 4.2 ms–6.9 ms · min 4.2 ms, max 6.9 ms · n=334rpic5.3 msgraphviz dot: median 84.3 ms · IQR 82.5 ms–85.4 ms · whiskers 78.3 ms–88.7 ms · min 78.3 ms, max 88.7 ms · n=35graphviz dot84.3 msd2: median 448.8 ms · IQR 442.6 ms–451.9 ms · whiskers 432.4 ms–455.8 ms · min 432.4 ms, max 455.8 ms · n=10d2448.8 msmermaid: median 713.4 ms · IQR 707.1 ms–729.7 ms · whiskers 699.8 ms–732.3 ms · min 699.8 ms, max 732.3 ms · n=10mermaid713.4 ms
Box = interquartile range (middle 50%), tick = median, whiskers = 1.5×IQR · log time axis · Apple M2 Pro, hyperfine, 10–454 runs/tool. rpic's IQR is 0.8 ms — the pic family renders in a deterministic hairline; mermaid's box spans ~23 ms.

The box widths are the story a single number can’t tell: rpic’s middle 50% of runs fall inside a 0.8 ms window, so its timing is as predictable as it is fast. In the 50-diagram batch mermaid’s total swung from 24 s to 60 s across runs — the headless-Chromium boot is not just slow but variable, which is what makes it painful in a build.

Read the numbers honestly

Why rpic is fast

No system dependencies to shell out to, no VM, no browser: one static binary parses, evaluates and serializes SVG in a single pass, and the texlabels math renderer only engages when a $…$ label exists. The same engine compiled to WebAssembly powers the playground and the JS binding, so in-browser rendering needs no server round-trip at all.