-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Unexpected allocations caused by unused typevars #29393
Labels
Comments
Was also observed here #27813 (comment) (there's a response below that). Hasn't been a high priority but I guess we can do something about it, and/or give a warning for parameters that don't appear in the signature. |
JeffBezanson
added
performance
Must go faster
compiler:codegen
Generation of LLVM IR and native code
labels
Sep 27, 2018
+1 for a warning. |
Might be fixed by #29323? |
No, I think it's a calling convention issue. |
bors bot
added a commit
to CliMA/ClimaCore.jl
that referenced
this issue
Jul 1, 2022
785: Add and fix Aqua tests r=charleskawczynski a=charleskawczynski This PR adds [Aqua](https://github.com/JuliaTesting/Aqua.jl) tests, specifically, `Aqua.test_unbound_args(ClimaCore)`, which tests that no functions defined in ClimaCore run into [this julia issue](JuliaLang/julia#29393). Adding this test revealed 9 instances of this issue, and the PR also includes fixes so that we pass all of the tests. Co-authored-by: Charles Kawczynski <[email protected]>
It's funny that the commit message explicitly says that it does not fix this issue. |
ranocha
added a commit
to ranocha/NLSolversBase.jl
that referenced
this issue
Oct 7, 2022
I got a warning on Julia v1.8.2: ``` [ Info: Precompiling OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] WARNING: method definition for TwiceDifferentiable at ~/.julia/packages/NLSolversBase/cfJrN/src/objective_types/incomplete.jl:96 declares type variable TH but does not use it. ``` Unused type variables can sometimes be bad, see JuliaLang/julia#29393
bors bot
added a commit
to CliMA/ClimaAtmos.jl
that referenced
this issue
Oct 7, 2022
896: Add aqua test r=charleskawczynski a=charleskawczynski This PR adds some aqua tests - For unbound type parameters, see JuliaLang/julia#29393 - For method ambiguities, see SciML/OrdinaryDiffEq.jl#1750 Co-authored-by: Charles Kawczynski <[email protected]>
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Under some circumstances, having an unused typevar in a method definition causes the method to unexpectedly allocate and perform poorly. For example:
where the
N
parameter is unused. Removing that parameter fixes the problem:Is this and expected performance issue? I've observed it with Julia 1.0 and the latest nightly build.
The text was updated successfully, but these errors were encountered: