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

Remove #[inline(always)] from CompressorOxide::default() #125

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

jrmuizel
Copy link
Contributor

With #[inline(always)] the body of default() will be inlined into external crates but the body will still contain calls to the LZOxide::new(), ParamsOxide::new(DEFAULT_FLAGS), Box::default() and DictOxide::new(DEFAULT_FLAGS). This ends up causing a copy of the large LZOxide to end up on the stack when used with Box::default as seen in: rust-lang/rust#101814

With #[inline(always)] the body of default() will be inlined into
external crates but the body will still contain calls to the
LZOxide::new(), ParamsOxide::new(DEFAULT_FLAGS), Box::default() and
DictOxide::new(DEFAULT_FLAGS). This ends up causing a copy of the large
LZOxide to end up on the stack when used with Box::default as seen in:
rust-lang/rust#101814
@oyvindln oyvindln merged commit c7643aa into Frommi:master Sep 15, 2022
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