You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feel free to close if this is a dupe, but I really like this because of how tiny the MWE is:
julia>versioninfo()
Julia Version 1.1.0-DEV.843
Commit a0bc8fdb75 (2018-12-0818:35 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin17.5.0)
CPU:Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
WORD_SIZE:64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
julia>@noinlinef(a, b; c::Bool=true, d::Float64=1.0) = a * b + c * d
f (generic function with 1 method)
julia> x, y =rand(2);
julia>f(x, y) # warmup1.0256215120847518
julia>@allocatedf(x, y) # sad allocation :(64
julia>@code_typedf(x, y) # _1 is only inferred as Function, I'm assuming that makes codegen sadCodeInfo(
1 ─ %1= invoke Main.:(#f#3)(true::Bool, 1.0::Float64, _1::Function, _2::Float64, _3::Float64)::Float64
└── return%1
) => Float64
The text was updated successfully, but these errors were encountered:
jrevels
changed the title
underlying method called by kwfunc method not precisely inferred if invocation can't be inlined
imprecise inference of underlying method called by kwfunc method causes unnecessary allocation
Dec 11, 2018
Feel free to close if this is a dupe, but I really like this because of how tiny the MWE is:
The text was updated successfully, but these errors were encountered: