Skip to content

Return SchemaBinary output from a shared arena - #7367

Merged
tim-smart merged 1 commit into
agent/codex-engineer/58cacc24from
agent/codex-engineer/eff-779-schema-binary-arena
Aug 20, 2026
Merged

Return SchemaBinary output from a shared arena#7367
tim-smart merged 1 commit into
agent/codex-engineer/58cacc24from
agent/codex-engineer/eff-779-schema-binary-arena

Conversation

@tim-smart

Copy link
Copy Markdown
Contributor

Summary

  • return exact SchemaBinary frame views from a bump-allocated output arena
  • isolate active and nested writers so later encodes never overwrite published ranges
  • document shared-buffer and transfer behavior, with lifetime, rollover, composition, and concurrent-fiber coverage
  • compare arena output with an immediate ownership copy across every existing benchmark case

Verification

  • nix develop -c pnpm vitest run packages/effect/test/unstable/encoding
  • nix develop -c pnpm lint
  • nix develop -c pnpm check
  • nix develop -c pnpm --dir packages/effect exec node benchmark/schema/SchemaBinary.ts

The measured arena encode was 4% faster than the copy control for the small record and 1-6% faster for the other cases.

Stacked on #7366 at b64f76655.

Closes EFF-779

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b717e74

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 30 packages
Name Type
effect Major
@effect/opentelemetry Major
@effect/vitest Major
@effect/ai-anthropic Major
@effect/ai-openai-compat Major
@effect/ai-openai Major
@effect/ai-openrouter Major
@effect/atom-react Major
@effect/atom-solid Major
@effect/atom-vue Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-deno Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-pglite Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-do Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/doctest Major
@effect/openapi-generator Major
@effect/docgen Major

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@effect-slopcop effect-slopcop Bot added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 20, 2026
@tim-smart
tim-smart merged commit c094566 into agent/codex-engineer/58cacc24 Aug 20, 2026
@tim-smart
tim-smart deleted the agent/codex-engineer/eff-779-schema-binary-arena branch August 20, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant