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

Remove unnecessary ValueOptions #1095

Merged
merged 3 commits into from
Jan 16, 2025
Merged

Remove unnecessary ValueOptions #1095

merged 3 commits into from
Jan 16, 2025

Conversation

kerams
Copy link
Contributor

@kerams kerams commented Dec 15, 2024

This decreases the size of AttributesBundle and Widget structs by 24 and 32 bytes, respectively.

There's no downside of using an empty array instead of ValueNone, since [||] is lowered to System.Array.Empty<_>, which doesn't allocate either. The code also didn't seem to rely on the distinction between ValueNone and ValueSome [||].

@TimLariviere
Copy link
Member

Thanks for the PR. That's would be a huge improvement given how many AttributesBundle are created all the time!
I will play with it this week and merge it :)

@TimLariviere TimLariviere merged commit e8ad111 into fabulous-dev:main Jan 16, 2025
1 check passed
@TimLariviere
Copy link
Member

Merged, thanks!
Gonna release it quickly

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