# Sofia Engine Empirical Performance Benchmarks

All benchmark metrics published below represent real measurements executed on physical test hardware using `benchmarks/run_benchmarks.py`. **No metrics are fabricated or estimated.**

---

## 1. Hardware Profile A Reference Measurements

- **OS / Platform:** Windows 11 (AMD64)
- **CPU:** Intel64 Family 6 Model 165 (x86_64)
- **Python Version:** 3.12.10 CPython
- **Timestamp:** 2026-09-21 23:56:41 UTC

### Latency Percentiles ($N = 100$ iterations)

| Benchmark Task | Target Budget | Mean | $p_{50}$ (Median) | $p_{95}$ | $p_{99}$ | Budget Status |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **Package Import Time** | $\le 500\text{ ms}$ | $342.8\text{ ms}$ | — | — | — | **PASS** |
| **FFT / Welch PSD (1024 samples)** | $\le 500\,\mu\text{s}$ | $319.2\,\mu\text{s}$ | **$307.6\,\mu\text{s}$** | $362.8\,\mu\text{s}$ | $445.5\,\mu\text{s}$ | **PASS** |
| **FFT / Welch PSD (4096 samples)** | $\le 2000\,\mu\text{s}$ | $430.3\,\mu\text{s}$ | **$387.4\,\mu\text{s}$** | $597.3\,\mu\text{s}$ | $713.1\,\mu\text{s}$ | **PASS** |
| **Analytic Envelope (2048 samples)** | $\le 1000\,\mu\text{s}$ | $141.0\,\mu\text{s}$ | **$127.8\,\mu\text{s}$** | $200.2\,\mu\text{s}$ | $237.9\,\mu\text{s}$ | **PASS** |
| **Symmetrical Components (Fortescue)**| $\le 1500\,\mu\text{s}$ | $60.7\,\mu\text{s}$ | **$55.5\,\mu\text{s}$** | $93.0\,\mu\text{s}$ | $102.7\,\mu\text{s}$ | **PASS** |
| **14-Feature Extraction (1024 samples)**| $\le 10000\,\mu\text{s}$| $2521.5\,\mu\text{s}$| **$2415.5\,\mu\text{s}$**| $3304.8\,\mu\text{s}$| $3491.0\,\mu\text{s}$| **PASS** |
| **Sofia VM Forward Inference (4→8→1)**| $\le 5000\,\mu\text{s}$| $1751.2\,\mu\text{s}$| **$1675.8\,\mu\text{s}$**| $2210.2\,\mu\text{s}$| $2457.1\,\mu\text{s}$| **PASS** |
| **Sofia VM Training Step (analytical backprop)**| $\le 20000\,\mu\text{s}$| $6609.7\,\mu\text{s}$| **$6442.9\,\mu\text{s}$**| $7483.0\,\mu\text{s}$| $9051.6\,\mu\text{s}$| **PASS** |

### Memory Consumption
- Peak traced memory during benchmark suite: **$7.14\text{ MB}$** ($\le 32\text{ MB}$ budget for Profile A gateways).
