Inference performance regression vs 1.1 (MDDatasets.jl) #33336
Closed
Description
For MDDatasets the following code
using MDDatasets
xingsrise = CrossType(:rise)
#Required mostly to test cross function:
y = [0,0,0,0,1,-3,4,5,6,7,-10,-5,0,0,0,-5,-10,10,-3,1,-4,0,0,0,0,0,0]
d10=DataF1(collect(1:length(y)), y)
@time _x = meas(:xcross, Event, d10, allow=xingsrise)
takes 80 seconds in 1.1 but seems to hang indefinitely on 1.2 and 1.3. Interrupting gives a stack trace deep into inference.
In addition, just loading MDDatasets make the REPL become extremely sluggish for a while on 1.2 and 1.3 (everything getting invalidated?). This is also noticeable on 1.1 but to a much smaller degree.
Here is an example that shows the REPL experience after loading the package (note that I show key pressed on the keyboard). After loading the package and typing 1
it takes about 6 seconds for it to appear in the REPL input field. Pressing enter then takes ~10 seconds for the result to show:
Edit:
1.2 finished:
julia> @time _x = meas(:xcross, Event, d10, allow=xingsrise)
6430.483092 seconds (8.14 G allocations: 511.835 GiB, 18.72% gc time)
DataF1(x=[1, 2, 3],y=[6.428571428571429, 17.5, 19.75])
1.3 finished:
julia> @time _x = meas(:xcross, Event, d10, allow=xingsrise)
8414.099232 seconds (10.91 G allocations: 684.973 GiB, 4.87% gc time)
DataF1(x=[1, 2, 3],y=[6.428571428571429, 17.5, 19.75])