-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Startup time regression on master vs 1.5 #36391
Comments
It's just
|
Thanks, it seems to be about 200 ms extra for REPL init then. |
Some of those are pretty hard to believe (not doubting you, I can reproduce what you're seeing). Smells like invalidation. With this diff: diff --git a/base/Base.jl b/base/Base.jl
index 777e07bd30..88f16161ab 100644
--- a/base/Base.jl
+++ b/base/Base.jl
@@ -74,6 +74,8 @@ include("generator.jl")
include("reflection.jl")
include("options.jl")
+const _invlist_ = ccall(:jl_debug_method_invalidation, Any, (Cint,), Int32(1))
+
# core operations & types
include("promotion.jl")
include("tuple.jl") you can turn on logging early. Then (you need timholy/SnoopCompile.jl#101) julia> Base._invlist_
6688-element Array{Any,1}:
MethodInstance for unsafe_getindex(::Core.Compiler.StepRangeLen{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},R,S} where S where R, ::Int64)
0
MethodInstance for iterate(::Core.Compiler.StepRangeLen{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},R,S} where S where R, ::Int64)
1
MethodInstance for iterate(::Union{Core.Compiler.LinRange{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode}}, Core.Compiler.StepRangeLen{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},R,S} where S where R})
2
MethodInstance for vcat(::Core.Compiler.AbstractRange{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode}})
3
MethodInstance for Array{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},1}(::Core.Compiler.AbstractRange{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode}})
4
MethodInstance for convert(::Type{Array{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},1}}, ::AbstractArray)
5
MethodInstance for Core.Compiler.Pair{Int64,Array{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},1}}(::Any, ::Any)
6
Tuple{Type{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode}},Any}
(::Type{T})(x::Tuple) where T<:Tuple in Base at tuple.jl:225
"jl_method_table_insert"
MethodInstance for convert(::Type{T}, ::Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}) where T<:(Array{T,1} where T)
0
MethodInstance for Core.Compiler.Order.Perm{Core.Compiler.Sort.Float.Left,V}(::Core.Compiler.Sort.Float.Left, ::Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}) where V<:(AbstractArray{T,1} where T)
1
MethodInstance for Core.Compiler.Order.Perm(::Core.Compiler.Sort.Float.Left, ::Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64})
2
MethodInstance for left(::Core.Compiler.Order.Perm{var"#s116",var"#s115"} where var"#s115"<:(Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}) where var"#s116"<:Union{Core.Compiler.Order.ForwardOrdering, Core.Compiler.Order.ReverseOrdering{Core.Compiler.Order.ForwardOrdering}})
⋮
MethodInstance for axes(::Array{Int64,1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{NamedTuple{(:indent, :msg),Tuple{Int64,SubString{String}}},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{UInt8,1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Union{Nothing, Symbol},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{SubString{String},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Array{Any,1},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Pair{Symbol,Any},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Pair{String,Array{Array{Pair{Symbol,Any},1},1}},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Union{Nothing, SubString{String}},1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Pkg.REPLMode.CommandSpec,1})
"invalidate_mt_cache"
MethodInstance for axes(::Array{Pair{String,Pkg.REPLMode.CommandSpec},1})
"invalidate_mt_cache"
MethodInstance for length(::SubArray{UInt8,1,Array{UInt8,1},Tuple{UnitRange{Int64}},true})
"invalidate_mt_cache"
julia> using SnoopCompile
julia> trees = invalidation_trees(Base._invlist_)
55-element Array{SnoopCompileAnalysis.MethodInvalidations,1}:
inserting lastindex(a::AbstractArray) in Base at abstractarray.jl:302 invalidated:
mt_backedges: 1: signature Tuple{typeof(lastindex),Array{Any,1}} triggered MethodInstance for pushmeta!(::Expr, ::Symbol) (0 children) less specific
inserting String(s::AbstractString) in Base at strings/string.jl:81 invalidated:
mt_backedges: 1: signature Tuple{Type{String},AbstractString} triggered MethodInstance for cconvert(::Type{Ptr{UInt8}}, ::AbstractString) (0 children) equal specificity
4 mt_cache
inserting to_indices(A, I::Tuple{}) in Base at multidimensional.jl:704 invalidated:
mt_backedges: 1: signature Tuple{typeof(to_indices),Any,Any} triggered MethodInstance for _maybe_reindex(::SubArray, ::Tuple{UnitRange{Int64}}, ::Tuple{}) (0 children) more specific
inserting fill!(A::AbstractArray{T,N} where N, x) where T in Base at multidimensional.jl:965 invalidated:
mt_backedges: 1: signature Tuple{typeof(fill!),SubArray,Type{StridedArray{_A, _B}} where _B where _A} triggered MethodInstance for __cat(::Array{_A,1} where _A, ::Tuple{Int64}, ::Tuple{Bool}, ::Type{StridedArray{_A, _B}} where _B where _A, ::Array{Any,1}) (0 children) less specific
inserting isless(::Missing, ::Any) in Base at missing.jl:87 invalidated:
mt_backedges: 1: signature Tuple{typeof(isless),Any,Char} triggered MethodInstance for <(::Any, ::Char) (0 children) ambiguous
inserting isless(::Any, ::Missing) in Base at missing.jl:88 invalidated:
mt_backedges: 1: signature Tuple{typeof(isless),Char,Any} triggered MethodInstance for <(::Char, ::Any) (0 children) ambiguous
inserting typemax(::Type{VersionNumber}) in Base at version.jl:142 invalidated:
mt_backedges: 1: signature Tuple{typeof(typemax),Type{VersionNumber}} triggered MethodInstance for VersionNumber(::String) (0 children) equal specificity
14 mt_cache
inserting (::Base.var"#string##kw")(::Any, ::typeof(string), n::BigInt) in Base.GMP at gmp.jl:681 invalidated:
mt_backedges: 1: signature Tuple{Base.var"#string##kw",NamedTuple{(:base, :pad),Tuple{Int64,Int64}},typeof(string),Any} triggered MethodInstance for escape_string(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::AbstractString, ::String) (0 children) ambiguous
122 mt_cache
deleting include(path::String) in Base at Base.jl:17 invalidated:
1 mt_cache
inserting convert(::Type{T}, f::LinearAlgebra.Factorization) where T<:AbstractArray in LinearAlgebra at /home/tim/src/julia-master/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/factorization.jl:58 invalidated:
mt_backedges: 1: signature Tuple{typeof(convert),Type{UnitRange{Int64}},Any} triggered MethodInstance for setindex!(::Array{UnitRange{Int64},1}, ::Any, ::Int64) (0 children) ambiguous
704 mt_cache
inserting convert(::Type{T}, x::T) where T<:Number in Base at number.jl:6 invalidated:
mt_backedges: 1: signature Tuple{typeof(convert),Type{T} where T,Int32} triggered MethodInstance for cconvert(::Type{T} where T, ::Int32) (0 children) ambiguous
backedges: 1: superseding convert(::Type{T}, x::T) where T in Base at essentials.jl:171 with MethodInstance for convert(::Type{T}, ::T) where T<:Int32 (1 children) more specific
inserting convert(::Type{T}, x::Number) where T<:Number in Base at number.jl:7 invalidated:
backedges: 1: superseding convert(::Type{Union{}}, x) in Base at essentials.jl:169 with MethodInstance for convert(::Type{Union{}}, ::Int32) (1 children) ambiguous
inserting Array{T,N}(x::AbstractArray{S,N}) where {T, N, S} in Base at array.jl:564 invalidated:
mt_backedges: 1: signature Tuple{Type{Array{_A,1}} where _A,Array{S,1} where S<:Union{Float32, Float64}} triggered MethodInstance for (Array{T,1} where T)(::Array{S,1}) where S<:Union{Float32, Float64} (1 children) less specific
4 mt_cache
inserting Array{T,1}(::UndefInitializer, m::Integer) where T in Base at baseext.jl:12 invalidated:
mt_backedges: 1: signature Tuple{Type{Array{Core.LineInfoNode,1}},UndefInitializer,Any} triggered MethodInstance for analyze_method!(::Int64, ::Core.Compiler.Signature, ::Any, ::Core.SimpleVector, ::Method, ::Expr, ::Core.Compiler.OptimizationState, ::Bool, ::Core.Compiler.InvokeData, ::Any) (0 children) ambiguous
2: signature Tuple{Type{Array{Core.LineInfoNode,1}},UndefInitializer,Any} triggered MethodInstance for analyze_method!(::Int64, ::Core.Compiler.Signature, ::Any, ::Core.SimpleVector, ::Method, ::Expr, ::Core.Compiler.OptimizationState, ::Bool, ::Nothing, ::Any) (0 children) ambiguous
3: signature Tuple{Type{Array{Any,1}},UndefInitializer,Any} triggered MethodInstance for type_lift_pass!(::Core.Compiler.IRCode) (1 children) ambiguous
5 mt_cache
inserting to_indices(A, I::Tuple{Vararg{Union{Integer, CartesianIndex},N} where N}) in Base at multidimensional.jl:705 invalidated:
backedges: 1: superseding to_indices(A, I::Tuple{Any}) in Base at indices.jl:322 with MethodInstance for to_indices(::Array{Char,1}, ::Tuple{UInt64}) (1 children) ambiguous
1 mt_cache
inserting promote_rule(T::Type{Union{Missing, Nothing}}, S::Type) in Base at missing.jl:48 invalidated:
backedges: 1: superseding promote_rule(T::Type{var"#s71"} where var"#s71">:Nothing, S::Type) in Base at some.jl:21 with MethodInstance for promote_rule(::Type{var"#s71"} where var"#s71">:Nothing, ::Type{Tuple{Tuple{Symbol},UnionAll,UnionAll}}) (1 children) more specific
inserting <(::Missing, ::Any) in Base at missing.jl:84 invalidated:
backedges: 1: superseding <(x, y) in Base at operators.jl:277 with MethodInstance for <(::Any, ::Char) (1 children) more specific
3 mt_cache
inserting <(::Any, ::Missing) in Base at missing.jl:85 invalidated:
backedges: 1: superseding <(x, y) in Base at operators.jl:277 with MethodInstance for <(::Char, ::Any) (1 children) more specific
inserting max(x::T, y::T) where T<:AbstractFloat in Base.Math at math.jl:711 invalidated:
backedges: 1: superseding max(x::Real, y::Real) in Base at promotion.jl:358 with MethodInstance for max(::Real, ::Real) (1 children) more specific
22 mt_cache
inserting any(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:729 invalidated:
backedges: 1: superseding any(f, itr) in Base at reduce.jl:871 with MethodInstance for any(::Base.var"#390#392", ::Array{Any,1}) (1 children) more specific
4 mt_cache
inserting AbstractArray{T,N}(A::AbstractArray{S,N}) where {T, N, S} in Base at array.jl:565 invalidated:
mt_backedges: 1: signature Tuple{Type{AbstractArray{_A,1}} where _A,Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}} triggered MethodInstance for convert(::Type{AbstractArray{T,1}}, ::Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}) where T (2 children) less specific
inserting sizeof(s::AbstractString) in Base at strings/basic.jl:177 invalidated:
backedges: 1: superseding sizeof(x) in Base at essentials.jl:449 with MethodInstance for sizeof(::String) (2 children) more specific
40 mt_cache
inserting lock(s::Base.LibuvStream) in Base at stream.jl:224 invalidated:
backedges: 1: superseding lock(::IO) in Base at io.jl:26 with MethodInstance for lock(::IO) (2 children) more specific
24 mt_cache
inserting unlock(s::Base.LibuvStream) in Base at stream.jl:225 invalidated:
backedges: 1: superseding unlock(::IO) in Base at io.jl:27 with MethodInstance for unlock(::IO) (2 children) more specific
1 mt_cache
⋮
inserting promote_rule(::Type{var"#s847"} where var"#s847"<:AbstractIrrational, ::Type{T}) where T<:Real in Base at irrationals.jl:42 invalidated:
backedges: 1: superseding promote_rule(::Type{var"#s71"} where var"#s71", ::Type{var"#s70"} where var"#s70") in Base at promotion.jl:235 with MethodInstance for promote_rule(::Type{T} where T<:Unsigned, ::Type{UInt64}) (5 children) more specific
1 mt_cache
deleting include(mod::Module, path::String) in Base at Base.jl:262 invalidated:
backedges: 1: superseding dummy() in SnoopCompileAnalysis at /home/tim/.julia/dev/SnoopCompile/SnoopCompileAnalysis/src/invalidations.jl:10 with MethodInstance for dummy() (5 children) ambiguous
108 mt_cache
inserting (::Type{T})(x::Tuple) where T<:Tuple in Base at tuple.jl:225 invalidated:
mt_backedges: 1: signature Tuple{Type{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode}},Any} triggered MethodInstance for unsafe_getindex(::Core.Compiler.StepRangeLen{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},R,S} where S where R, ::Int64) (6 children) ambiguous
inserting all(a::AbstractArray; dims) in Base at reducedim.jl:731 invalidated:
backedges: 1: superseding all(itr) in Base at reduce.jl:836 with MethodInstance for all(::Array{Bool,1}) (7 children) more specific
2 mt_cache
deleting include(mod::Module, path::String) in Base at Base.jl:10 invalidated:
backedges: 1: superseding dummy() in SnoopCompileAnalysis at /home/tim/.julia/dev/SnoopCompile/SnoopCompileAnalysis/src/invalidations.jl:10 with MethodInstance for dummy() (8 children) ambiguous
4 mt_cache
inserting convert(::Type{T}, s::T) where T<:AbstractString in Base at strings/basic.jl:229 invalidated:
mt_backedges: 1: signature Tuple{typeof(convert),Type{AbstractString},Any} triggered MethodInstance for Base.SimdLoop.SimdError(::Any) (6 children) ambiguous
backedges: 1: superseding convert(::Type{T}, x::T) where T in Base at essentials.jl:171 with MethodInstance for convert(::Type{AbstractString}, ::AbstractString) (1 children) more specific
2: superseding convert(::Type{T}, x::T) where T in Base at essentials.jl:171 with MethodInstance for convert(::Type{String}, ::String) (2 children) more specific
inserting all(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:732 invalidated:
backedges: 1: superseding all(f, itr) in Base at reduce.jl:918 with MethodInstance for all(::typeof(identity), ::Array{Bool,1}) (1 children) more specific
2: superseding all(f, itr) in Base at reduce.jl:918 with MethodInstance for all(::Base.var"#384#385"{_A} where _A, ::Any) (3 children) more specific
3: superseding all(f, itr) in Base at reduce.jl:918 with MethodInstance for all(::Base.var"#388#389", ::Array{Any,1}) (5 children) more specific
5 mt_cache
inserting hash(s::Union{SubString{String}, String}, h::UInt64) in Base at hashing2.jl:239 invalidated:
backedges: 1: superseding hash(x, h::UInt64) in Base at hashing.jl:23 with MethodInstance for hash(::String, ::UInt64) (10 children) more specific
93 mt_cache
inserting codeunit(s::Test.GenericString) in Test at /home/tim/src/julia-master/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1586 invalidated:
mt_backedges: 1: signature Tuple{typeof(codeunit),AbstractString} triggered MethodInstance for codeunit(::SubstitutionString) (0 children) more specific
2: signature Tuple{typeof(codeunit),AbstractString} triggered MethodInstance for sizeof(::AbstractString) (0 children) more specific
3: signature Tuple{typeof(codeunit),AbstractString} triggered MethodInstance for map(::typeof(lowercase), ::AbstractString) (0 children) more specific
4: signature Tuple{typeof(codeunit),AbstractString} triggered MethodInstance for map(::typeof(uppercase), ::AbstractString) (0 children) more specific
5: signature Tuple{typeof(codeunit),AbstractString} triggered MethodInstance for codeunit(::SubString) (10 children) more specific
inserting !(::Missing) in Base at missing.jl:100 invalidated:
mt_backedges: 1: signature Tuple{typeof(!),Any} triggered MethodInstance for show_datatype(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Type{var"#s429"} where var"#s429"<:Real) (0 children) more specific
2: signature Tuple{typeof(!),Any} triggered MethodInstance for show_call(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Symbol, ::Any, ::Any, ::Int64, ::Int64, ::Bool) (0 children) more specific
3: signature Tuple{typeof(!),Any} triggered MethodInstance for show_datatype(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Type{var"#s429"} where var"#s429"<:Integer) (0 children) more specific
4: signature Tuple{typeof(!),Any} triggered MethodInstance for show_datatype(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Type{var"#s429"} where var"#s429"<:Unsigned) (0 children) more specific
5: signature Tuple{typeof(!),Any} triggered MethodInstance for mightalias(::Array{_A,1} where _A, ::Array{Any,1}) (2 children) more specific
6: signature Tuple{typeof(!),Any} triggered MethodInstance for !=(::Unsigned, ::Int64) (4 children) more specific
7: signature Tuple{typeof(!),Any} triggered MethodInstance for !=(::Any, ::Int64) (5 children) more specific
inserting iterate(s::Test.GenericString) in Test at /home/tim/src/julia-master/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1589 invalidated:
mt_backedges: 1: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for print(::Base.GenericIOBuffer{Array{UInt8,1}}, ::AbstractString) (0 children) more specific
2: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for escape_raw_string(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::AbstractString) (0 children) more specific
3: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for Base.Iterators.Stateful(::AbstractString) (0 children) more specific
4: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for escape_raw_string(::Base.GenericIOBuffer{Array{UInt8,1}}, ::AbstractString) (0 children) more specific
5: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for map(::typeof(lowercase), ::AbstractString) (0 children) more specific
6: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for map(::typeof(uppercase), ::AbstractString) (0 children) more specific
7: signature Tuple{typeof(iterate),AbstractString} triggered MethodInstance for iterate(::SubstitutionString) (11 children) more specific
1 mt_cache
inserting promote_rule(T::Type{Missing}, S::Type) in Base at missing.jl:47 invalidated:
backedges: 1: superseding promote_rule(::Type{var"#s71"} where var"#s71", ::Type{var"#s70"} where var"#s70") in Base at promotion.jl:235 with MethodInstance for promote_rule(::Type, ::Type{Any}) (3 children) more specific
2: superseding promote_rule(::Type{var"#s71"} where var"#s71", ::Type{var"#s70"} where var"#s70") in Base at promotion.jl:235 with MethodInstance for promote_rule(::Type{S} where S, ::Type{Tuple{Tuple{Symbol},UnionAll,UnionAll}}) (3 children) more specific
3: superseding promote_rule(::Type{var"#s71"} where var"#s71", ::Type{var"#s70"} where var"#s70") in Base at promotion.jl:235 with MethodInstance for promote_rule(::Type{T} where T, ::Type{Any}) (4 children) more specific
4: superseding promote_rule(::Type{var"#s71"} where var"#s71", ::Type{var"#s70"} where var"#s70") in Base at promotion.jl:235 with MethodInstance for promote_rule(::DataType, ::Type{Any}) (5 children) more specific
18 mt_cache
inserting to_indices(A, inds, I::Tuple{CartesianIndices,Vararg{Any,N} where N}) in Base.IteratorsMD at multidimensional.jl:392 invalidated:
mt_backedges: 1: signature Tuple{typeof(to_indices),Any,Any,Tuple} triggered MethodInstance for to_indices(::Any, ::Tuple) (0 children) more specific
2: signature Tuple{typeof(to_indices),Any,Tuple,Tuple} triggered MethodInstance for to_indices(::Any, ::Any, ::Tuple{Any,Vararg{Any,N} where N}) (16 children) ambiguous
backedges: 1: superseding to_indices(A, inds, I::Tuple{Any,Vararg{Any,N} where N}) in Base at indices.jl:324 with MethodInstance for to_indices(::Any, ::Tuple{Any}, ::Tuple{Any}) (2 children) more specific
66 mt_cache
inserting (::Type{T})(x::BigInt) where T<:Union{UInt128, UInt16, UInt32, UInt64, UInt8} in Base.GMP at gmp.jl:347 invalidated:
mt_backedges: 1: signature Tuple{Type{UInt64},Integer} triggered MethodInstance for convert(::Type{UInt64}, ::Integer) (3 children) ambiguous
2: signature Tuple{Type{UInt64},Integer} triggered MethodInstance for convert(::Type{UInt64}, ::Integer) (15 children) ambiguous
41 mt_cache
inserting (NamedTuple{names,T} where T<:Tuple)(nt::NamedTuple) where names in Base at namedtuple.jl:93 invalidated:
mt_backedges: 1: signature Tuple{Type{NamedTuple{_A,T} where T<:Tuple} where _A,NamedTuple{names,T} where T<:Tuple where names} triggered MethodInstance for tail(::NamedTuple{names,T} where T<:Tuple) where names (29 children) equal specificity
inserting (::Type{T})(x::BigInt) where T<:Union{Int128, Int16, Int32, Int64, Int8} in Base.GMP at gmp.jl:356 invalidated:
mt_backedges: 1: signature Tuple{Type{Int64},Integer} triggered MethodInstance for _array_for(::Type{Any}, ::Any, ::Core.Compiler.HasLength) (0 children) ambiguous
2: signature Tuple{Type{Int64},Integer} triggered MethodInstance for _collect(::Type{Core.LineInfoNode}, ::Any, ::Core.Compiler.HasLength) (0 children) ambiguous
3: signature Tuple{Type{Int64},Integer} triggered MethodInstance for _array_for(::Type{Any}, ::Any, ::Base.HasLength) (0 children) ambiguous
4: signature Tuple{Type{Int64},Integer} triggered MethodInstance for _check_bitset_bounds(::Integer) (1 children) ambiguous
5: signature Tuple{Type{Int64},Integer} triggered MethodInstance for _collect(::Type{Method}, ::Core.Compiler.Generator{_A,Core.Compiler.var"#16#18"} where _A, ::Core.Compiler.HasLength) (2 children) ambiguous
6: signature Tuple{Type{Int64},Integer} triggered MethodInstance for SubString(::SubString, ::Int64, ::Integer) (2 children) ambiguous
7: signature Tuple{Type{Int64},Integer} triggered MethodInstance for SubString(::SubString, ::Integer, ::Integer) (2 children) ambiguous
8: signature Tuple{Type{Int64},Integer} triggered MethodInstance for SubString(::SubString, ::Integer, ::Int64) (7 children) ambiguous
9: signature Tuple{Type{Int64},Integer} triggered MethodInstance for convert(::Type{Int64}, ::Integer) (19 children) ambiguous
inserting map!(f::Tf, C::SparseArrays.AbstractSparseMatrixCSC, A::SparseArrays.AbstractSparseMatrixCSC, Bs::Vararg{SparseArrays.SparseMatrixCSC,N}) where {Tf, N} in SparseArrays.HigherOrderFns at /home/tim/src/julia-master/usr/share/julia/stdlib/v1.6/SparseArrays/src/higherorderfns.jl:148 invalidated:
mt_backedges: 1: signature Tuple{typeof(map!),typeof(Base._views),Any,Any} triggered MethodInstance for mapany(::typeof(Base._views), ::Any) (8 children) ambiguous
2: signature Tuple{typeof(map!),typeof(Base.Docs.tvar),Any,Any} triggered MethodInstance for mapany(::typeof(Base.Docs.tvar), ::Any) (29 children) ambiguous
backedges: 1: superseding map!(f::F, dest::AbstractArray, A::AbstractArray) where F in Base at abstractarray.jl:2147 with MethodInstance for map!(::typeof(Base.Docs.tvar), ::AbstractArray, ::AbstractArray) (1 children) ambiguous
21 mt_cache
inserting Array{T,1}(r::AbstractRange{T}) where T in Base at range.jl:995 invalidated:
mt_backedges: 1: signature Tuple{Type{Array{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},1}},AbstractArray} triggered MethodInstance for convert(::Type{Array{Tuple{Core.SlotNumber,Core.Compiler.NewSSAValue,Core.PhiCNode},1}}, ::AbstractArray) (0 children) ambiguous
2: signature Tuple{Type{Array{Int32,1}},AbstractArray} triggered MethodInstance for convert(::Type{Array{Int32,1}}, ::AbstractArray) (4 children) ambiguous
3: signature Tuple{Type{Array{Int64,1}},AbstractArray} triggered MethodInstance for convert(::Type{Array{Int64,1}}, ::AbstractArray) (10 children) ambiguous
4: signature Tuple{Type{Array{Any,1}},AbstractArray} triggered MethodInstance for convert(::Type{Array{Any,1}}, ::AbstractArray) (15 children) ambiguous
5: signature Tuple{Type{Array{Method,1}},AbstractArray} triggered MethodInstance for convert(::Type{Array{Method,1}}, ::AbstractArray) (34 children) ambiguous
3 mt_cache
inserting with_output_color(f::Function, color::Union{Int64, Symbol}, io::IO, args...; bold) in Base at util.jl:69 invalidated:
mt_backedges: 1: signature Tuple{typeof(Base.with_output_color),Base.var"#585#588"{String},Symbol,IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}} triggered MethodInstance for (::Base.var"#584#587"{String})(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) (81 children) less specific
36 mt_cache
inserting (::Type{T})(x::Float16) where T<:Integer in Base at float.jl:71 invalidated:
mt_backedges: 1: signature Tuple{Type{Bool},Number} triggered MethodInstance for convert(::Type{Bool}, ::Number) (1 children) ambiguous
2: signature Tuple{Type{Int64},Real} triggered MethodInstance for convert(::Type{Int64}, ::Real) (1 children) ambiguous
3: signature Tuple{Type{Int32},Any} triggered MethodInstance for unsafe_getindex(::Core.Compiler.StepRangeLen{Int32,R,S} where S where R, ::Int64) (3 children) ambiguous
4: signature Tuple{Type{Int32},Any} triggered MethodInstance for lerpi(::Int64, ::Int64, ::Int32, ::Int32) (6 children) ambiguous
5: signature Tuple{Type{Int32},Number} triggered MethodInstance for convert(::Type{Int32}, ::Number) (15 children) ambiguous
6: signature Tuple{Type{UInt64},Number} triggered MethodInstance for convert(::Type{UInt64}, ::Number) (29 children) ambiguous
7: signature Tuple{Type{Int64},Number} triggered MethodInstance for convert(::Type{Int64}, ::Number) (53 children) ambiguous
inserting mapreduce(f, op, A::Union{Base.AbstractBroadcasted, AbstractArray}; dims, init) in Base at reducedim.jl:310 invalidated:
backedges: 1: superseding mapreduce(f, op, itr; kw...) in Base at reduce.jl:287 with MethodInstance for mapreduce(::typeof(Base.operator_precedence), ::typeof(min), ::Array{Any,1}) (115 children) more specific
inserting (::Type{T})(itr) where T<:Tuple in Base at tuple.jl:230 invalidated:
mt_backedges: 1: signature Tuple{Type{V} where V<:Core.Compiler.BitArray{1},Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}} triggered MethodInstance for convert(::Type{V} where V<:Core.Compiler.BitArray{1}, ::Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}) (2 children) ambiguous
2: signature Tuple{Type{T} where T<:(Array{T,1} where T),Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}} triggered MethodInstance for convert(::Type{T}, ::Array{var"#s114",1} where var"#s114"<:Union{Float32, Float64}) where T<:(Array{T,1} where T) (129 children) ambiguous
inserting ncodeunits(s::Test.GenericString) in Test at /home/tim/src/julia-master/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1585 invalidated:
mt_backedges: 1: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for thisind(::AbstractString, ::Int64) (0 children) more specific
2: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for lastindex(::AbstractString) (0 children) more specific
3: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for checkbounds(::Type{Bool}, ::AbstractString, ::UnitRange{Int64}) (0 children) more specific
4: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for nextind(::AbstractString, ::Int64, ::Int64) (0 children) more specific
5: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for isempty(::AbstractString) (0 children) more specific
6: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for checkbounds(::Type{Bool}, ::AbstractString, ::Int64) (0 children) more specific
7: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for findnext(::Base.Fix2{typeof(isequal),Char}, ::AbstractString, ::Int64) (0 children) more specific
8: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for length(::AbstractString, ::Int64, ::Int64) (0 children) more specific
9: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for sizeof(::AbstractString) (0 children) more specific
10: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for normalize_key(::AbstractString) (0 children) more specific
11: signature Tuple{typeof(ncodeunits),AbstractString} triggered MethodInstance for ncodeunits(::SubstitutionString) (134 children) more specific
154 mt_cache
inserting getindex(A::Array, i1::Union{Integer, CartesianIndex}, I::Union{Integer, CartesianIndex}...) in Base at multidimensional.jl:557 invalidated:
backedges: 1: superseding getindex(A::AbstractArray, I...) in Base at abstractarray.jl:1050 with MethodInstance for getindex(::Array{Char,1}, ::UInt64) (218 children) more specific
15 mt_cache Fascinating. Altogether 761 unique non- |
Starting 1.5/1.4 with
--trace-compile=stderr
gives the following:So here we have a good accuracy in precompilation of startup and REPL initialization (most compilation are
Vararg
methods that seem to not precompile)However, on master:
This has the effect that startup time is increased (50ms to 100ms for me) but the major regression is the time until the REPL prompt (which isn't trivial to measure exactly).
The text was updated successfully, but these errors were encountered: