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

Subtype: Avoid split y::Union when comparing with a forall var. #48603

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

N5N3
Copy link
Member

@N5N3 N5N3 commented Feb 9, 2023

Should bring the load time of CUDA.jl back to a similar level before the regression.
MWE:

julia> @time !<:(Tuple{Pair{<:T,<:T}, Val{S} where {S}} where {T<:Base.BitInteger},
                 Tuple{Pair{<:T,<:T}, Val{Int}} where {T<:Base.BitInteger})
  0.000016 seconds (33 allocations: 2.188 KiB) # master 86.345139 seconds (50.49 M allocations: 7.023 GiB, 0.53% gc time)

close #48582.

@N5N3 N5N3 added performance Must go faster types and dispatch Types, subtyping and method dispatch labels Feb 9, 2023
@N5N3 N5N3 marked this pull request as draft February 9, 2023 10:36
If `y` has no free typevar. Then `x <:  y` wont cause any env change. Thus there's no need to split `y`.
@N5N3 N5N3 changed the title Add a local save point in subtype hot path. Subtype: Avoid split y::Union when comparing with a forall var. Feb 9, 2023
@N5N3 N5N3 marked this pull request as ready for review February 9, 2023 15:57
@staticfloat staticfloat merged commit b0ac45f into JuliaLang:master Feb 9, 2023
@staticfloat
Copy link
Member

Thanks, @N5N3!

@N5N3 N5N3 deleted the temp branch February 10, 2023 01:03
@KristofferC KristofferC added the backport 1.9 Change should be backported to release-1.9 label Mar 14, 2023
@KristofferC KristofferC mentioned this pull request Mar 24, 2023
52 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CUDA takes a very long time to load
4 participants