Can you elaborate? Does the following contradict the above?
julia> const c=1000
1000
julia> @btime [2i for i in 1:c];
864.123 ns (1 allocation: 7.94 KiB)
julia> @btime ntuple(i->2i, c);
38.839 μs (751 allocations: 43.39 KiB)
Thanks.
Can you elaborate? Does the following contradict the above?
julia> const c=1000
1000
julia> @btime [2i for i in 1:c];
864.123 ns (1 allocation: 7.94 KiB)
julia> @btime ntuple(i->2i, c);
38.839 μs (751 allocations: 43.39 KiB)
Thanks.