Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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)

ToolFilesBytesMedian (ms)Throughput (MB/s)Relative
Fatou141,9377.05.981.00x
Runic141,93721.21.980.33x
JuliaFormatter141,9379.94.240.71x

Project (JuliaSyntax/src)

ToolFilesBytesMedian (ms)Throughput (MB/s)Relative
Fatou15332,78354.06.171.00x
Runic15332,783216.81.530.25x
JuliaFormatter15332,78384.53.940.64x