Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely slow subtype query causes unreasonable compilation times #56606

Closed
topolarity opened this issue Nov 19, 2024 · 0 comments · Fixed by #56640
Closed

Extremely slow subtype query causes unreasonable compilation times #56606

topolarity opened this issue Nov 19, 2024 · 0 comments · Fixed by #56640
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch

Comments

@topolarity
Copy link
Member

topolarity commented Nov 19, 2024

struct Closure{T,U} end
struct Pick{T} end
function muladd end

const A = Tuple{Tuple{Pick{1}, Closure{typeof(muladd), Tuple{Pick{2}, Pick{3}, Closure{typeof(muladd), Tuple{Pick{4}, Pick{5}, Closure{typeof(muladd), Tuple{Pick{6}, Pick{7}, Closure{typeof(muladd), Tuple{Pick{8}, Pick{9}, Closure{typeof(muladd), Tuple{Pick{10}, Pick{11}, Closure{typeof(muladd), Tuple{Pick{12}, Pick{13}, Closure{typeof(muladd), Tuple{Pick{14}, Pick{15}, Closure{typeof(muladd), Tuple{Pick{16}, Pick{17}, Closure{typeof(muladd), Tuple{Pick{18}, Pick{19}, Closure{typeof(muladd), Tuple{Pick{20}, Pick{21}, Closure{typeof(muladd), Tuple{Pick{22}, Pick{23}, Closure{typeof(muladd), Tuple{Pick{24}, Pick{25}, Closure{typeof(muladd), Tuple{Pick{26}, Pick{27}, Closure{typeof(muladd), Tuple{Pick{28}, Pick{29}, Closure{typeof(muladd), Tuple{Pick{30}, Pick{31}, Closure{typeof(muladd), Tuple{Pick{32}, Pick{33}, Closure{typeof(muladd), Tuple{Pick{34}, Pick{35}, Closure{typeof(muladd), Tuple{Pick{36}, Pick{37}, Closure{typeof(Base.:(*)), Tuple{Pick{38}, Pick{39}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, Pick{40}}, Int64}
const B = Tuple{Tuple{Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(muladd), <:Tuple{Pick, Pick, Closure{typeof(Base.:(*)), <:Tuple{Pick, Pick}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, Pick}, Int64}

println(A <: B) # takes a very, very long time... (>10 minutes)

This subtyping query is the root cause of the compilation blow-up in SciML/OrdinaryDiffEq.jl#2535

@topolarity topolarity added bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch labels Nov 19, 2024
@N5N3 N5N3 closed this as completed in 7df1dfa Nov 26, 2024
KristofferC pushed a commit that referenced this issue Dec 3, 2024
KristofferC pushed a commit that referenced this issue Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant