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

Prelude: Map improvements #523

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Prelude: Map improvements #523

merged 2 commits into from
Dec 19, 2024

Conversation

kengorab
Copy link
Owner

Use uninitialized intrinsic to have "empty" MapEntry objects in the Map's _entries field, rather than the previous approach of having an array of MapEntry? values. This approach adds a bit more logical overhead, but it significantly reduces the amount of allocations when working with MapEntry values, and also eliminates the need for flattenOption.

Use `uninitialized` intrinsic to have "empty" `MapEntry` objects in the
`Map`'s `_entries` field, rather than the previous approach of having an
array of `MapEntry?` values. This approach adds a bit more logical
overhead, but it significantly reduces the amount of allocations when
working with `MapEntry` values, and also eliminates the need for
`flattenOption`.
@kengorab kengorab merged commit fa5702b into master Dec 19, 2024
1 check passed
@kengorab kengorab deleted the map-improvement branch December 19, 2024 02:14
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