Skip to content

Compact the embedded corpus trie - #57

Merged
andrew merged 2 commits into
mainfrom
corpus-compact-trie
Sep 6, 2026
Merged

andrew merged 2 commits into
mainfrom
corpus-compact-trie

Conversation

@andrew

@andrew andrew commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Introduce corpus format version 6 with unary trie degrees, sparse terminal heads, and byte-aligned 16-bit or 32-bit edge-token deltas. Regenerate the embedded corpus with the new encoding and reject invalid padding, widths, deltas, and terminal positions while decoding.

The compressed corpus falls from 12.62 to 12.11 MB and the decoded form from 41.70 to 30.09 MB. Combined with the failure-link change below it, corpus loading falls from about 664 to 394 milliseconds and cold matcher creation from about 714 to 448 milliseconds. Retained memory remains about 114.87 MB; transient cold-start allocation rises from 154.64 to 166.54 MB.

Base automatically changed from aho-parallel-links to main September 6, 2026 19:32
@andrew
andrew force-pushed the corpus-compact-trie branch from 09809be to cb2e8ad Compare September 6, 2026 19:32
@andrew
andrew marked this pull request as ready for review September 6, 2026 19:56
@andrew
andrew merged commit 1f1b3a3 into main Sep 6, 2026
7 checks passed
@andrew
andrew deleted the corpus-compact-trie branch September 6, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant