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

Avoid inlining of the function that returns test data #23

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

randombit
Copy link
Owner

This appears to be the root cause of the binary size blowing up. Using #[inline(never)], there is no difference in crate size between include_str! and include_bytes!. Probably something about the expect in the include_bytes! approach disabled inlining, leading to the observed improvement. Actually just disabling inlining is going to work more reliably, however.

This appears to be the root cause of the binary size blowing up. Using
`#[inline(never)]`, there is no difference in crate size between `include_str!`
and `include_bytes!`. Probably something about the expect in the
`include_bytes!` approach disabled inlining, leading to the observed
improvement. Actually just disabling inlining is going to work more reliably,
however.
@randombit randombit merged commit c5b2b64 into master Aug 27, 2024
6 checks passed
@randombit randombit deleted the jack/inline-never branch August 27, 2024 20:31
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