# codedb v0.2.572 vs v0.2.58

**Date:** 2026-04-15
**Repo:** codedb (89 files, Zig)
**Machine:** Apple M3 Ultra, 256GB, macOS 25.4.0
**Method:** MCP stdio, pre-indexed, warm, p50 of 25 iterations

## What changed in v0.2.58

Identifier token splitting in the word index. Tokens like `searchContent`
are split into sub-tokens `search` + `content` (all lowercased); `word_index` → `word` + `index`;
`HTTPHandler` → `http` + `handler`. All word-index keys are now lowercased.

Queries like `search` now resolve in **Tier 0** (O(1) word-index hash) instead of Tier 1
(trigram candidate filter + SIMD content scan). Same recall, ~4x faster.

## Latency results (p50 ms)

| Query | Type | v0.2.572 | v0.2.58 | Speedup | Notes |
|---|---|---|---|---|---|
| `search` | SUB | 0.98 | 0.16 | **6.2x** | sub-token of searchContent, searchDeduped |
| `file` | SUB | 0.58 | 0.09 | **6.6x** | sub-token of indexFile, removeFile |
| `get` | SUB | 0.63 | 0.13 | **4.7x** | sub-token of getOrPut, getEntry |
| `index` | SUB | 0.61 | 0.15 | **4.2x** | sub-token of indexFile, TrigramIndex |
| `init` | SUB | 0.46 | 0.12 | **3.8x** | sub-token of initExplorer, initTrigram |
| `content` | SUB | 0.63 | 0.19 | **3.3x** | sub-token of searchContent, readContent |
| `word` | SUB | 0.60 | 0.21 | **2.9x** | sub-token of word_index, WordTokenizer |
| `remove` | SUB | 0.39 | 0.20 | **2.0x** | sub-token of removeFile |
| `allocator` | FULL | 0.51 | 0.12 | **4.2x** | common full word |
| `wordindex` | FULL | 0.75 | 0.15 | **5.0x** | WordIndex lowercased to wordindex |
| `xyzzy99` | FULL | 0.12 | 0.10 | 1.2x | nonexistent — miss fast in both |

**Geo-mean: SUB-TOKEN 3.9x faster, FULL identifier 2.9x faster.**

## Recall

Both versions find the same files (delta = 0 everywhere). v0.2.572 already had full recall
via trigram/content scan; v0.2.58 reaches the same answer faster via Tier-0 word index.

## Tier path before/after

| Query | v0.2.572 | v0.2.58 |
|---|---|---|
| `search`, `init`, `get`, ... | Trigram candidates → SIMD content scan | **Tier 0 word-index O(1)** |
| `WordIndex` (exact) | Tier 0 (`WordIndex` key) | Tier 0 (`wordindex` key) |
| `wordindex` (lowercased) | Trigram scan | **Tier 0 O(1)** |

## Index changes

| Identifier | v0.2.572 keys | v0.2.58 keys |
|---|---|---|
| `searchContent` | `searchContent` | `searchcontent`, **`search`**, **`content`** |
| `word_index` | `word_index` | `word_index`, **`word`**, **`index`** |
| `HTTPHandler` | `HTTPHandler` | `httphandler`, **`http`**, **`handler`** |
| `getOrPut` | `getOrPut` | `getorput`, **`get`**, **`or`**, **`put`** |
