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

@noinline exp by default. #46359

Merged
merged 1 commit into from
Aug 22, 2022
Merged

@noinline exp by default. #46359

merged 1 commit into from
Aug 22, 2022

Conversation

oscardssmith
Copy link
Member

Also remove a bunch of @inline from when I didn't trust the compiler to do reasonable things. Fixes #46323. This isn't a pure win (it will stop exp from auto-vectorizing) but I think it's probably the correct choice. Autovectorization seems to me to be a separate concern.

also remove a bunch of `@inline` from when I didn't trust the compiler to do reasonable things.
@oscardssmith oscardssmith added the domain:maths Mathematical functions label Aug 15, 2022
@N5N3 N5N3 added the backport 1.8 Change should be backported to release-1.8 label Aug 16, 2022
@chriselrod
Copy link
Contributor

it will stop exp from auto-vectorizing

=(

@KristofferC
Copy link
Sponsor Member

Why would julia chose to inline this? It seems way too big for that to happen by the normal inlining heuristics, or?

@oscardssmith
Copy link
Member Author

oscardssmith commented Aug 16, 2022

nope, it has a cost of 90 which is just below the cutoff. It's a lot of code, but a lot of it is Int operations that have a cost of 1.

@JeffBezanson
Copy link
Sponsor Member

From triage: seems ok, but we should also experiment with lowering the inlining cutoff --- if 90 is too expensive here, isn't it too expensive everywhere? We also no longer depend on inlining as much for constant folding, so we might not need to do so much anymore.

@KristofferC KristofferC merged commit 445586d into master Aug 22, 2022
@KristofferC KristofferC deleted the oscardssmith-no-inline-exp branch August 22, 2022 08:13
KristofferC pushed a commit that referenced this pull request Aug 26, 2022
also remove a bunch of `@inline` from when I didn't trust the compiler to do reasonable things.

(cherry picked from commit 445586d)
KristofferC pushed a commit that referenced this pull request Aug 26, 2022
also remove a bunch of `@inline` from when I didn't trust the compiler to do reasonable things.

(cherry picked from commit 445586d)
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance regression in version 1.8 for exp of complex argument
5 participants