# Text indexing and retrieval benchmark — measured results

- Host: darkoza001; Python 3.14.4
- Window UTC: 2026-10-28T13:18:14.236339+00:00 to 2026-10-28T13:18:42.034428+00:00
- Data: synthetic corpus only; no user files read; no dependencies installed.
- Per size: two index designs, 3 build repetitions each, 8 queries repeated 10 times.
- Validation: top-10 results were relevant for every controlled query; both designs had identical rankings.

## Measurements

| Documents | Index | Median build (s) | Docs/s | Peak traced MB | Query median (ms) | Query P95 (ms) | Hit@10 |
|---:|---|---:|---:|---:|---:|---:|---:|
| 2,000 | set | 0.2672 | 7,485 | 10.32 | 0.3976 | 0.5358 | 1.000 |
| 2,000 | array | 0.2183 | 9,161 | 1.31 | 0.1819 | 0.4297 | 1.000 |
| 8,000 | set | 1.0694 | 7,481 | 41.14 | 2.1996 | 2.4372 | 1.000 |
| 8,000 | array | 0.8707 | 9,188 | 5.16 | 0.7456 | 1.7787 | 1.000 |
| 20,000 | set | 2.7318 | 7,321 | 106.53 | 5.9292 | 6.2852 | 1.000 |
| 20,000 | array | 2.1656 | 9,235 | 12.81 | 1.8957 | 4.5276 | 1.000 |

## Decision

- Compare build throughput, memory and query latency together; do not select an index based on one metric alone.
- Keep the representation configurable until a repeat run confirms the best choice.
- Before production use, validate against permission-safe representative documents and human-judged relevance queries.

## Limits

- The corpus is synthetic and the queries are deliberately easy; Hit@10=1.0 checks implementation correctness, not real-user retrieval quality.
- Python-traced peak memory does not equal process RSS.
- No service or scheduled job was installed.
