Skip to content

Conversation

@stephencelis
Copy link
Member

Inspired by UIBinding's internals, this pull request refactors Store from a fully type-erased internal RootStore class and concretely composed key paths and closures using the internal ToState type to a more efficient internal protocol composition called "Core". Core preserves the underlying State and Action generics, avoiding unneeded, forced existential casts and it preserves the structure of individual key paths rather than appending the key paths directly, which is even known to be buggy. Benchmarks show an overall performance win here, if marginal, and the resulting code should be safer.

@stephencelis stephencelis merged commit d4d1df8 into main Mar 27, 2025
15 checks passed
@stephencelis stephencelis deleted the core branch March 27, 2025 00:24
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