Skip to content

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.

@changeset-bot
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
@vercel
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.

3 participants