Skip to content

Reuse token output buffers and registry pages in the shared reader - #103

Merged
augustin-cheron merged 1 commit into
mainfrom
codex/token-registry-buffer-reuse
Nov 26, 2026
Merged

augustin-cheron merged 1 commit into
mainfrom
codex/token-registry-buffer-reuse

Conversation

@augustin-cheron

Copy link
Copy Markdown
Collaborator

Changes

  • Reuse token output buffers by capacity in the shared Compact V2 reader.
  • Refill local registry cache pages in place when no worker holds a reference.

Verification

  • 399 targeted tests passed. The Worker built for WebAssembly.
  • Full and mint-filtered JSON matched byte for byte over 256 blocks.
  • In a 4,096-block sample, Rust allocation calls fell from 1,609,874 to 606,839. Median wall time fell from 15.40 s to 14.46 s over four paired runs.

@augustin-cheron
augustin-cheron merged commit b1d7887 into main Nov 26, 2026
6 checks passed
@augustin-cheron
augustin-cheron deleted the codex/token-registry-buffer-reuse branch November 26, 2026 13:40
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