Skip to content

Conversation

@vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 17, 2023

This was a primary motivation for #49111. Previously, we'd see some some methods like convert(::Type{T}, ::T) where T<:Float64 (apparently from tuple convert specializations), which were not necessary

julia> which(Tuple{Type{T}, T} where {T<:Number}).specializations
svec(MethodInstance for Float64(::Float64), MethodInstance for AbstractFloat(::Float64), MethodInstance for AbstractFloat(::BigFloat), MethodInstance for AbstractFloat(::Float32), MethodInstance for Float32(::Float32), MethodInstance for Float16(::Float16), MethodInstance for Int64(::Int64), nothing, nothing, nothing)

@vtjnash vtjnash added the types and dispatch Types, subtyping and method dispatch label Apr 17, 2023
@vtjnash
Copy link
Member Author

vtjnash commented Apr 17, 2023

Note that the existing Core.Compiler.normalize_typevars fails this case because it has:

julia> (Tuple{Type{T},T} where T<:Int) <: Tuple{Type{Int},Int}
false

@vtjnash
Copy link
Member Author

vtjnash commented Apr 18, 2023

@nanosoldier runbenchmarks(!"scalar", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@N5N3
Copy link
Member

N5N3 commented Apr 19, 2023

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

types and dispatch Types, subtyping and method dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants