Skip to content

Optimize build time for {shift,rotate}_elements_{left/right} - #317

Open
Shnatsel wants to merge 1 commit into
linebender:mainfrom
Shnatsel:undo-rotate-shift-slowdown
Open

Optimize build time for {shift,rotate}_elements_{left/right}#317
Shnatsel wants to merge 1 commit into
linebender:mainfrom
Shnatsel:undo-rotate-shift-slowdown

Conversation

@Shnatsel

@Shnatsel Shnatsel commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

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.
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