Open
Description
Taking an example from discource,
julia> using BenchmarkTools
julia> x_nan = [([1., 2., 3.],), ([1., 2., 3., NaN],)]
julia> x_missing = [([1., 2., 3.],), ([1., 2., 3., missing],)]
julia> @btime map(x -> sum.(x), $x_nan)
julia> @btime map(x -> sum.(x), $x_missing)
I get:
- 1.8:
58.755 ns (1 allocation: 80 bytes)
808.369 ns (8 allocations: 240 bytes)
- 1.9 and recent nightly:
59.531 ns (1 allocation: 80 bytes)
6.157 μs (16 allocations: 576 bytes)
So, the type-unstable performance suffers a lot, even for a very simple piece of code!
Unlike another 1.9 regression #48612, this one is present even on nightly.