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 Benchmarks

Detailed performance analysis demonstrating aspect-rs overhead.

Key Findings

  • Empty function: +2ns overhead (20%)
  • Logging aspect: +2ns overhead (13%)
  • Timing aspect: +2ns overhead (10%)
  • Caching aspect (hit): +2ns overhead (40%)
  • Caching aspect (miss): +2ns overhead (2%)

Conclusion: aspect-rs has consistent ~2ns overhead regardless of function complexity.

Benchmark Suite

All benchmarks use criterion with statistical analysis:

cargo bench --package aspect-benches

See Methodology for details.