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
So when the field is a vector, @btime reports wrong allocation, assuming @time and @allocated are right. This may be related to JuliaLang/julia#53694 but I'm not sure.
julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 × Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, broadwell)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
The text was updated successfully, but these errors were encountered:
It seems the @time reports no allocations as the compiler can see that s1 is constructed and then the first field is accessed and so can figure out that the type of s1() is Float64. Whilst for BenchmarkTools the s1() call happens in a non-inlined function so it cannot do the same optimisation.
It's not obvious that it could be worked around, nor that we would want to.
MWE:
The output I see is
So when the field is a vector,
@btime
reports wrong allocation, assuming@time
and@allocated
are right. This may be related to JuliaLang/julia#53694 but I'm not sure.The text was updated successfully, but these errors were encountered: