|
| 1 | +# CORTEX Benchmark Baselines |
| 2 | + |
| 3 | +> **Status:** Baseline measurements pending a hardware CI run. |
| 4 | +> The values below are illustrative targets; replace with real output from |
| 5 | +> `npm run benchmark:all` on representative hardware. |
| 6 | +
|
| 7 | +## Williams Bound H(t) — Sublinear Growth Curve |
| 8 | + |
| 9 | +| Graph mass (t) | H(t) = ceil(0.5 * sqrt(t * log2(1+t))) | H(t)/t ratio | |
| 10 | +|---------------:|----------------------------------------:|-------------:| |
| 11 | +| 1 000 | ~22 | 0.022 | |
| 12 | +| 10 000 | ~99 | 0.010 | |
| 13 | +| 100 000 | ~408 | 0.004 | |
| 14 | +| 1 000 000 | ~1 576 | 0.002 | |
| 15 | + |
| 16 | +Key invariant: H(t)/t strictly decreases as t grows. |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Dummy Embedder Hotpath |
| 21 | + |
| 22 | +Run: `npm run benchmark:dummy` |
| 23 | + |
| 24 | +| Benchmark | Mean latency (ms) | Throughput | |
| 25 | +|-------------------------|------------------:|----------:| |
| 26 | +| Single short input | TBD | TBD | |
| 27 | +| Batch 16 medium inputs | TBD | TBD | |
| 28 | +| Batch 64 short inputs | TBD | TBD | |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## Query Latency vs Corpus Size |
| 33 | + |
| 34 | +Run: `npm run benchmark:query-latency` |
| 35 | + |
| 36 | +| Corpus size | Mean query latency (ms) | |
| 37 | +|------------:|------------------------:| |
| 38 | +| 100 pages | TBD | |
| 39 | +| 500 pages | TBD | |
| 40 | + |
| 41 | +Expected: latency grows sub-linearly because hotpath residents are scored |
| 42 | +first and most queries are served without scanning the full corpus. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Storage Overhead |
| 47 | + |
| 48 | +Run: `npm run benchmark:storage-overhead` |
| 49 | + |
| 50 | +| Page count | Vector store size (bytes) | Bytes per page | |
| 51 | +|-----------:|--------------------------:|---------------:| |
| 52 | +| 50 | TBD | TBD | |
| 53 | +| 200 | TBD | TBD | |
| 54 | + |
| 55 | +Expected: linear growth (no hidden quadratic allocations). |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## Hotpath Scaling |
| 60 | + |
| 61 | +Run: `npm run benchmark:hotpath-scaling` |
| 62 | + |
| 63 | +| Graph mass | H(t) capacity | Resident count | Promotion sweep (ms) | |
| 64 | +|-----------:|--------------:|---------------:|---------------------:| |
| 65 | +| 1 000 | ~22 | TBD | TBD | |
| 66 | +| 5 000 | ~55 | TBD | TBD | |
| 67 | + |
| 68 | +Invariant: Resident count never exceeds H(t). |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## How to Update Baselines |
| 73 | + |
| 74 | +1. Run `npm run benchmark:all` on the target hardware. |
| 75 | +2. Copy the `mean` column values from the Vitest bench output. |
| 76 | +3. Replace every `TBD` cell in this file with the measured value. |
| 77 | +4. Commit with message `chore: update benchmark baselines — <hardware>`. |
0 commit comments