v1.11-rc1: Using copy!
or .=
with Memory
is slower than [:] =
and Vector
#55079
Labels
copy!
or .=
with Memory
is slower than [:] =
and Vector
#55079
I experienced a two time slow-down with
copy!
and.=
, but not[:]
. I suspect this might have something to do with the discussion here: https://discourse.julialang.org/t/increase-in-allocations-with-julia-v1-11-beta/112838/2I put the following code in a script,
debug.jl
, and didinclude("debug.jl")
in a fresh REPL session. I've included the lowered code print out.On my machine with a fresh Julia REPL session, the output is:
On my machine, there is no difference in the above print out for the lowered code between the
Vector
andMemory
versions ofcopy!
,.=
, and[:] =
. It seems theBase.unsafe_copyto!
from the lowered[:] =
withMemory
doesn't suffer from the performance hit.The text was updated successfully, but these errors were encountered: