Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: more signal fine-tuning #9531

Merged
merged 8 commits into from
Nov 18, 2023
Merged

chore: more signal fine-tuning #9531

merged 8 commits into from
Nov 18, 2023

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 18, 2023

Rather than having a single monomorphic signal object, it can be just as fast two have two object shapes. This also reduces memory usage as the source signal shape can be cheaper.

Copy link

changeset-bot bot commented Nov 18, 2023

🦋 Changeset detected

Latest commit: f8b892e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

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

@trueadm trueadm changed the title Tune signals 2 chore: more signal fine-tuning Nov 18, 2023
Copy link

vercel bot commented Nov 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-5-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2023 2:05pm

value: V;
};

export type ComputationSignal<V = unknown> = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an extension of the Signal interface? If so, should we make these interfaces so we can use extends?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no Signal interface. Signal is a union of the two shapes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant SourceSignal, which looks like a strict subset of ComputationSignal

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.

None yet

3 participants