Optimize build time for {shift,rotate}_elements_{left/right} - #317
Open
Shnatsel wants to merge 1 commit into
Open
Optimize build time for {shift,rotate}_elements_{left/right}#317Shnatsel wants to merge 1 commit into
Shnatsel wants to merge 1 commit into
Conversation
Move them from being emitted as dedicated array methods over and over to default trait methods that are implemented in terms of slide(), similar to linebender#292 but lowering into backend methods instead of safe transmute directly. These were responsible for 21k out of 130k emitted lines of code and a lot of const generics. This change reduces x86 build time from 3.44s to 3s, reduces emitted metadata size by 25% from 25MB to 20MB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Move them from being emitted as dedicated backend methods for each backend and width that just call slide(), to default trait methods that are implemented in terms of slide(), similar to #292.
These were responsible for 21k out of 130k emitted lines of code and a lot of const generics. This change reduces x86 build time from 3.44s to 3s, reduces emitted metadata size by 25% from 25MB to 20MB.
@LaurenzV you were right to be concerned about build times in #274. It didn't emit LLVM IR until instantiated but still created a lot of extra work for the frontend.