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

Make mul_add inline #14

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Make mul_add inline #14

merged 1 commit into from
Jul 4, 2023

Conversation

HadrienG2
Copy link
Contributor

Experience shows that rustc can fail to inline it in some circumstances, which is Very Bad.

Experience shows that rustc [can fail to inline it in some circumstances](https://internals.rust-lang.org/t/caller-side-inline-directives/19078/7?u=hadrieng), which is Very Bad.
@vorner
Copy link
Owner

vorner commented Jul 4, 2023

And I've seen the other effect, something getting inlined and being slower too… but OK.

Do you want me to make a release with this?

@vorner vorner merged commit 8f0630d into vorner:master Jul 4, 2023
0 of 2 checks passed
@HadrienG2
Copy link
Contributor Author

HadrienG2 commented Jul 4, 2023

Indeed, excessive inlining can cause problems and the #[inline] directive should be used with reason. However, when something is meant to compile into a single SIMD instruction, it is definitely worth inlining :)

I do not need a release immediately as this only degrades the performance of multiple codegen units, and I'm currently stuck with a single codegen unit for other reasons... Just preparing for a bright future when I will someday be able to remove that codegen-units = 1 from my Cargo.toml and enjoy fast builds again ;)

@vorner
Copy link
Owner

vorner commented Jul 5, 2023

OK, poke me when you feel like a release would be nice.

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