OXC Angular Compiler Performance Study

oxc-angular-compiler is a Rust Angular template compiler built on OXC, distributed as a native Node module via NAPI-RS. I benchmarked it against @angular/compiler 100 iterations, 20 warmup, five template sizes on Apple Silicon (darwin/arm64, Node v22.12.0).

Full benchmark dashboard

Compilation time

Compilation time comparison

Small templates are a wash. Things diverge at larger sizes: at 4566 chars legacy runs at 0.57ms, OXC at 1.88ms. The template-parse-only stage of OXC is faster across the board but that excludes code generation so it is not a direct comparison.

Speedup factor

Tail latency

Percentile distribution

Legacy has heavier tails at small template sizes. P99 for the small fixture is 0.262ms vs 0.105ms for OXC. For incremental dev builds where you are recompiling one component at a time, that matters.

Latency breakdown

Memory

Memory comparison

FixtureOXC (KB)Legacy (KB)
tiny2982 122
small3415 169
medium534668
large1 0912 876
xlarge3 5911 933

OXC uses far less memory on small templates. That reverses at xlarge.

Scaling

Scaling analysis

Legacy holds throughput well as template size grows. OXC degrades past ~1000 chars, likely NAPI bridge overhead.

The raw results are in benchmarks/ of the repo if you want to run it yourself.