Performance
Fatou is a compiled Rust formatter competing with two Julia-native tools, Runic and JuliaFormatter. This page compares their raw formatting throughput.
Methodology
All three tools expose a pure String -> String formatter
(fatou::formatter::format, Runic.format_string,
JuliaFormatter.format_text). We measure that function directly in a warm
loop: the tool is loaded once, run through a few warmup calls, and then timed
over many iterations. This deliberately excludes process startup and
first-call JIT compilation for the Julia tools, which would otherwise dominate
and obscure the actual formatting cost. In other words, these numbers reflect a
long-lived editor or language-server session, not the cold julia -e ...
command-line invocation.
Because each tool runs in its own runtime, we report throughput in MB/s, which normalizes for byte count and stays comparable even when tools cover different files. Each tool formats with its own default style; we are measuring speed, not comparing output. A file counts for a tool only if that tool formats it without error, and any skips are reported.
The corpus is JuliaSyntax.jl (the
parser Fatou targets for parity), pinned to a tag. Two scenarios: a single
substantial source file, and the whole src/ directory.
Reproduce with task bench (after reloading the devenv shell so Runic is on
the Julia path). Results are written to bench/results.json.
Results
Corpus: JuliaSyntax.jl v0.4.10 (09576ca). Versions: Fatou 0.4.0, Runic 1.7.0, JuliaFormatter 2.10.1, Julia 1.12.6.
Warm-loop timing: 50 iterations (single file), 20 iterations (project); 3 warmup call(s); median reported. Each tool uses its own default style. JIT and process startup excluded.
Single file (parse_stream.jl)
| Tool | Files | Bytes | Median (ms) | Throughput (MB/s) | Relative |
|---|---|---|---|---|---|
| Fatou | 1 | 41,937 | 7.0 | 5.98 | 1.00x |
| Runic | 1 | 41,937 | 21.2 | 1.98 | 0.33x |
| JuliaFormatter | 1 | 41,937 | 9.9 | 4.24 | 0.71x |
Project (JuliaSyntax/src)
| Tool | Files | Bytes | Median (ms) | Throughput (MB/s) | Relative |
|---|---|---|---|---|---|
| Fatou | 15 | 332,783 | 54.0 | 6.17 | 1.00x |
| Runic | 15 | 332,783 | 216.8 | 1.53 | 0.25x |
| JuliaFormatter | 15 | 332,783 | 84.5 | 3.94 | 0.64x |