-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add niche optimization #49
Open
Kijewski
wants to merge
8
commits into
rust-ux:master
Choose a base branch
from
Kijewski:pr-niche
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Sep 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 79323d7 - Browse repository at this point
Copy the full SHA 79323d7View commit details -
This PR adds niche optimization. This lets the compiler use values outside of the valid integer range to store e.g. other enum variants. This makes `Option<u7>` one byte. The internal representation is own the same as the related primitive type, i.e. every u30 can be transmuted to u32. The other direction is possible if the u32 is representable in the u30 range.
Configuration menu - View commit details
-
Copy full SHA for 3b02c33 - Browse repository at this point
Copy the full SHA 3b02c33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 191510c - Browse repository at this point
Copy the full SHA 191510cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36acdeb - Browse repository at this point
Copy the full SHA 36acdebView commit details
Commits on Sep 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 01c5bf3 - Browse repository at this point
Copy the full SHA 01c5bf3View commit details -
This speeds up the compilation by 50% (YMMV), because code is only generated if used. The methods should generate trivial instructions for most methods, so there should be no drawbacks in using this annotation.
Configuration menu - View commit details
-
Copy full SHA for 1c7a8ef - Browse repository at this point
Copy the full SHA 1c7a8efView commit details
Commits on Sep 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for dadb1db - Browse repository at this point
Copy the full SHA dadb1dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 65b6a7e - Browse repository at this point
Copy the full SHA 65b6a7eView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.