Closed
Description
This might just be #28126, but it looks like a separate problem. On 1.0.2:
julia> using BenchmarkTools
julia> v = fill(2.0, 50000);
julia> v2 = vcat(v, missing);
julia> v3 = vcat(missing, v);
julia> @btime $v .* 3.0;
33.105 μs (2 allocations: 390.70 KiB)
julia> @btime $v2 .* 3.0;
1.610 ms (99498 allocations: 2.33 MiB)
julia> @btime $v3 .* 3.0;
3.867 ms (7 allocations: 439.77 KiB)
Apart from the 40X performance difference, two things stand out:
- 99498 allocations for
v2
. Why? - Why is
v3
slower thanv2
, in spite of allocating much less?