julia> @btime $y .= $y.^2
6.818 ns (0 allocations: 0 bytes)
See e.g. Function calls in global scope, benchmarking, etc - #2 by mbauman.
julia> @btime $y .= $y.^2
6.818 ns (0 allocations: 0 bytes)
See e.g. Function calls in global scope, benchmarking, etc - #2 by mbauman.