Skip to content

Performance & Benchmarks

symtrace is designed for ultra-low overhead execution, delivering instant semantic diffs on individual files while scaling sub-linearly on large multi-file changesets.

Tested on a production release build (LLVM -O3, LTO enabled) against the express repository (d:\rust_playground\express):

ScenarioCommandFilesAST NodesParse TimeDiff TimeTotal TimeSpeedup Factor
Cold AST Parsesymtrace express HEAD~1 HEAD (Cold)26,01132.21 ms0.94 ms86.77 msBaseline
Warm Cache Hitsymtrace express HEAD~1 HEAD (Warm)26,0113.77 ms1.24 ms22.21 ms3.91× faster
JSON Outputsymtrace express HEAD~1 HEAD --json26,0113.66 ms1.00 ms18.38 ms4.72× faster
Working Tree Diffsymtrace express HEAD (Single Commit)000.01 ms0.00 ms142.88 msN/A
Full Test Suitecargo test --all (166 tests)N/A~65,000N/AN/A90.00 ms (0.09s)166 tests / 90ms

  1. Parallel Execution (rayon) — Files and AST nodes are parsed, fingerprinted, and matched concurrently across all available CPU cores.
  2. Two-Tier AST Caching — Recently parsed trees are cached in a 500-capacity in-memory LRU cache and persistent versioned disk cache (bincode serialized).
  3. BLAKE3 SIMD Fingerprinting — Node hashes use SIMD-accelerated BLAKE3 hashing to process thousands of nodes per millisecond.
  4. Arena Memory Allocation (bumpalo) — Zero-overhead tree construction avoids thousands of individual heap allocations.
  5. Early Skipping — Identical file blobs across commits are bypassed prior to parsing.

Every run calculates precise timing stats visible in both terminal output and JSON telemetry:

Performance
Files processed : 2
Nodes compared : 6,011
Parse time : 3.77 ms
Diff time : 1.24 ms
Total time : 22.21 ms

For large monorepos or untrusted codebases, resource limits prevent runaway memory or parsing hangs:

Terminal window
symtrace . HEAD~1 HEAD \
--max-file-size 10485760 \
--max-ast-nodes 500000 \
--parse-timeout-ms 5000