Repository navigation
Cache native decoded blocks within an explicit byte budget - #11
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repeated native gathers previously decompressed the same blocks on every call. Add an optional per-handle decoded-block LRU with an explicit payload-byte budget and a 64-entry cap. Opening still disables caching; files, original row IDs and dtype bytes stay unchanged. Raw/oversized blocks bypass caching, failed decodes are not inserted, and budget changes clear entries.
Expose additive C cache configuration/usage/hit counters and
native_cache_bytesthrough NativeRows, Engram factory/gather and ordinary embedding loaders. Zero-budget loading stays compatible with older compiled libraries; opting in requires a rebuilt library. Handles remain immutable and single-worker. Scratch, metadata and query buffers are additional memory beyond the decoded payload budget.Validation:
Raw samples, hashes, commands, initial pilot and negative capacity results are retained in
docs/native_cache_evidence_20261022/, summarized indocs/native_cache_20261022.md. Small English SGNS tables and short repeated traces; no real Engram workload, cold I/O, total process RSS, GPU or task-quality claim.