Skip to main content

Benchmarks

All numbers are median of 3 runs on macOS (Apple Silicon), Node.js v22.17.0. TypeDoc 0.28.18 with --skipErrorChecking flag.

Real-World: es-toolkit (603 files, 1322 symbols)

Measured against es-toolkit.

MetricoxdocTypeDoc 0.28Speedup
JSON Generation0.24s1.70s7x faster
HTML Generation0.25s2.53s10x faster
Peak Memory131MB470MB3.6x less

Real-World: radashi (162 files, 437 symbols)

Measured against radashi.

MetricoxdocTypeDoc 0.28Speedup
JSON Generation0.13s1.12s8.6x faster
Peak Memory84MB272MB3.2x less

Synthetic Scale Test

Generated fixtures with increasing file counts, each file containing 3 documented symbols.

FilesSymbolsTimeMemoryThroughput
1003000.03s6MB~3,300/s
5001,5000.10s10MB~5,100/s
1,0003,0000.18s6MB~5,700/s
5,00015,0000.81s33MB~6,200/s

Why the Performance Difference?

TypeDoc loads the full TypeScript compiler (tsc) to resolve types, build a program graph, and check types — even with --skipErrorChecking, it still initializes the full compiler pipeline. This has a fixed overhead of ~1s regardless of project size.

oxdoc uses OXC parser (Rust NAPI) which parses syntax only — no type checking, no program graph. The parser returns AST + comments synchronously via parseSync(), and all heavy work runs in native Rust.

TypeDocoxdoc
Parsertsc (JavaScript)OXC (Rust NAPI)
Type resolutionFullNone (signature as-is)
Fixed overhead~1s~0.05s
Per-file cost~2ms~0.15ms

Reproduce

git clone https://github.com/jiji-hoon96/oxdoc.git
cd oxdoc
pnpm install && pnpm build

# Synthetic benchmark
pnpm bench

# Real-world comparison (requires TypeDoc installed globally)
time node dist/cli/index.js generate --format json --output /tmp/oxdoc-out ./path/to/project/src
time npx typedoc --json /tmp/typedoc.json --entryPoints ./path/to/project/src/index.ts --skipErrorChecking