Skip to content

Speed up discriminated-union and callback-heavy code - #728

Closed
ctate wants to merge 1 commit into
mainfrom
ctate/speed-up-discriminated-810625
Closed

ctate wants to merge 1 commit into
mainfrom
ctate/speed-up-discriminated-810625

Conversation

@ctate

@ctate ctate commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator
  • Switches and comparisons on discriminated record unions dispatch on the union tag when the field cannot differ from it, and integral number remainders avoid the floating-point library call.
  • Captured bindings that are never reassigned are read without extra references, and a local's final read hands its reference to the consumer instead of copying it.
  • Emission and liveness tests plus differential programs cover tag dispatch, remainder edge cases, captured callbacks and final reads.

- Switches and comparisons on discriminated record unions dispatch on the union tag when the field cannot differ from it, and integral number remainders avoid the floating-point library call.
- Captured bindings that are never reassigned are read without extra references, and a local's final read hands its reference to the consumer instead of copying it.
- Emission and liveness tests plus differential programs cover tag dispatch, remainder edge cases, captured callbacks and final reads.
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Oct 7, 2026 11:17pm UTC

This branch was successfully deployed

1 active deployment
Preview — 77234ec6 Deployed Oct 7, 2026 by vercel[bot]
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