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

Outline monomorphic load functions #896

Merged
merged 2 commits into from
Mar 30, 2024
Merged

Conversation

Ralith
Copy link
Collaborator

@Ralith Ralith commented Mar 30, 2024

Seems to save about 5MiB (out of 77MiB total pre-change) in the debug build of ash-window's winit example. No obvious impact on compile time or release build size, probably because these only have one callsite each anyway in normal use. Still, seems like an easy win, might have more impact to folks who use *Fn directly, and it's nice to know we're not emitting a bunch of unnecessary IR.

No changelog entry as this is not a publicly-visible change.

Copy link
Collaborator

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a simple but solid improvement! Now that the expensive monomorphization around XXXFnXXX::load() is gone, there should be no need to apply the same trick to the new load_with() function introduced in #846 I presume.

Co-authored-by: Marijn Suijten <marijns95@gmail.com>
@Ralith Ralith force-pushed the outlined-loaders branch from 40bdcc3 to ba78cf0 Compare March 30, 2024 17:18
@Ralith Ralith merged commit 1b24430 into ash-rs:master Mar 30, 2024
10 checks passed
@Ralith Ralith deleted the outlined-loaders branch March 30, 2024 17:30
@MarijnS95 MarijnS95 added this to the Ash 0.38 milestone Dec 3, 2024
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.

2 participants