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
This happens because Julia cannot infer correctly the type in the second case, which results in bad performance overall.
julia> dump(f)
#9 (function of type var"#9#10"{Int64})
julia> dump(b)
#11 (function of type var"#11#12"{DataType})
R: Int64 <: Signed
Provided MWE seems to be very simple, but we hit this performance issue in a very complex code involving a lot of lambda functions. @cscherrer faced similar issue in his MeasureBase.jl package.
julia> versioninfo()
Julia Version 1.6.3
Commit ae8452a9e0 (2021-09-23 17:34 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Reproducible on master 146de38 as well (same hardware).
The text was updated successfully, but these errors were encountered:
Consider two functions:
while these functions semantically should do the same, their performance is drastically different:
This happens because Julia cannot infer correctly the type in the second case, which results in bad performance overall.
Provided MWE seems to be very simple, but we hit this performance issue in a very complex code involving a lot of lambda functions. @cscherrer faced similar issue in his MeasureBase.jl package.
Reproducible on master 146de38 as well (same hardware).
The text was updated successfully, but these errors were encountered: