Open mkitti opened 9 months ago
julia> SnoopCompile.flatten(tinf; sortby=inclusive)
476-element Vector{SnoopCompileCore.InferenceTiming}:
InferenceTiming: 0.000001/0.000001 on convert(::Type{Union{String, Vector{String}}}, ::Union{String, Vector{String}})
InferenceTiming: 0.000001/0.000001 on LinearIndices(::Tuple{Base.OneTo{Int64}})
InferenceTiming: 0.000001/0.000001 on LinearIndices(::Tuple{Base.OneTo{Int64}})
InferenceTiming: 0.000001/0.000001 on LinearIndices(::Tuple{Base.OneTo{Int64}})
InferenceTiming: 0.000001/0.000001 on GenericMemoryRef(::Memory{String})
InferenceTiming: 0.000002/0.000002 on LinearIndices(::Tuple{Base.OneTo{Int64}})
InferenceTiming: 0.000003/0.000003 on Base.Generator(::Base.var"#238#239"{Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}}}, ::UnitRange{Int64})
InferenceTiming: 0.000003/0.000003 on Base.Generator(::Base.var"#238#239"{Base.var"#974#975"{Tuple{}, IdDict{Any, Any}}}, ::UnitRange{Int64})
InferenceTiming: 0.000003/0.000003 on valtype(::Type{Dict{String, Vector{String}}})
InferenceTiming: 0.000004/0.000004 on keytype(::Type{Dict{String, Vector{String}}})
InferenceTiming: 0.000004/0.000004 on ArgumentError(::LazyString)
InferenceTiming: 0.000004/0.000004 on getproperty(::Base.Generator{UnitRange{Int64}, Base.var"#238#239"{Base.var"#974#975"{Tuple{String}, IdDict{Any, Any}}}}, iter::Symbol)
InferenceTiming: 0.000004/0.000004 on keytype(::Type{Dict{String, Union{String, Vector{String}}}})
InferenceTiming: 0.000004/0.000004 on Base.isbadzero(max::typeof(max), ::Dates.DateTime)
InferenceTiming: 0.000004/0.000004 on Base.Generator(::Function, ::Vector{Dict{String, Dates.DateTime}})
InferenceTiming: 0.000004/0.000004 on getproperty(::Base.Generator{UnitRange{Int64}, Base.var"#238#239"{Base.var"#974#975"{Tuple{String}, IdDict{Any, Any}}}}, f::Symbol)
InferenceTiming: 0.000004/0.000004 on getproperty(::Base.Generator{UnitRange{Int64}, Base.var"#238#239"{Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}}}}, f::Symbol)
InferenceTiming: 0.000004/0.000004 on getproperty(::Base.Generator{UnitRange{Int64}, Base.var"#238#239"{Base.var"#974#975"{Tuple{String}, IdDict{Any, Any}}}}, f::Symbol)
InferenceTiming: 0.000004/0.000004 on getproperty(::Base.Generator{UnitRange{Int64}, Base.var"#238#239"{Base.var"#974#975"{Tuple{}, IdDict{Any, Any}}}}, f::Symbol)
InferenceTiming: 0.000004/0.000004 on (::Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}})(2::Int64)
InferenceTiming: 0.000004/0.000004 on (::Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}})(2::Int64)
InferenceTiming: 0.000004/0.000004 on (::Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}})(2::Int64)
InferenceTiming: 0.000004/0.000004 on getproperty(::Base.Generator{UnitRange{Int64}, Base.var"#238#239"{Base.var"#974#975"{Tuple{}, IdDict{Any, Any}}}}, f::Symbol)
InferenceTiming: 0.000004/0.000004 on (::Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}})(2::Int64)
⋮
InferenceTiming: 0.001064/0.007251 on ntuple(::Base.var"#974#975"{Tuple{String}, IdDict{Any, Any}}, ::Int64)
InferenceTiming: 0.000282/0.007682 on Base.deepcopy_internal(::Tuple{String}, ::IdDict{Any, Any})
InferenceTiming: 0.001826/0.007841 on Dict{String, Vector{String}}(::Dict{String, Any})
InferenceTiming: 0.000980/0.009039 on Base._ntuple(::Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}}, ::Int64)
InferenceTiming: 0.001543/0.010806 on ntuple(::Base.var"#974#975"{Tuple{UInt64}, IdDict{Any, Any}}, ::Int64)
InferenceTiming: 0.003117/0.010958 on convert(::Type{Dict{String, Vector{String}}}, ::Dict{String, Any})
InferenceTiming: 0.000230/0.011204 on Base.deepcopy_internal(::Tuple{UInt64}, ::IdDict{Any, Any})
InferenceTiming: 0.001650/0.013674 on Base._mapreduce(identity::typeof(identity), max::typeof(max), IndexLinear()::IndexLinear, ::Vector{Dates.DateTime})
InferenceTiming: 0.000655/0.014454 on Base._mapreduce_dim(identity::typeof(identity), max::typeof(max), Base._InitialValue()::Base._InitialValue, ::Vector{Dates.DateTime}, Colon()::Colon)
InferenceTiming: 0.000572/0.015026 on Base.var"#mapreduce#879"(Colon()::Colon, Base._InitialValue()::Base._InitialValue, mapreduce::typeof(mapreduce), identity::typeof(identity), max::typeof(max), ::Vector{Dates.DateTime})
InferenceTiming: 0.008886/0.015110 on convert(::Type{Dict{String, Union{String, Vector{String}}}}, ::Dict{String, Any})
InferenceTiming: 0.000584/0.015610 on mapreduce(identity::typeof(identity), max::typeof(max), ::Vector{Dates.DateTime})
InferenceTiming: 0.000632/0.016242 on Base.var"#_maximum#897"(Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}()::Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, _maximum::typeof(Base._maximum), identity::typeof(identity), ::Vector{Dates.DateTime}, Colon()::Colon)
InferenceTiming: 0.000593/0.016835 on Base._maximum(identity::typeof(identity), ::Vector{Dates.DateTime}, Colon()::Colon)
InferenceTiming: 0.000589/0.017424 on Base.var"#_maximum#896"(Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}()::Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, _maximum::typeof(Base._maximum), ::Vector{Dates.DateTime}, Colon()::Colon)
InferenceTiming: 0.000554/0.017978 on Base._maximum(::Vector{Dates.DateTime}, Colon()::Colon)
InferenceTiming: 0.000574/0.018552 on Base.var"#maximum#894"(Colon()::Colon, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}()::Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, maximum::typeof(maximum), ::Vector{Dates.DateTime})
InferenceTiming: 0.000616/0.019168 on maximum(::Vector{Dates.DateTime})
InferenceTiming: 0.198520/0.198520 on getindex(::IdDict{Any, Any}, ::Memory{String})
InferenceTiming: 0.000388/0.201604 on Base.deepcopy_internal(::Memory{String}, ::IdDict{Any, Any})
InferenceTiming: 0.000513/0.202885 on Base.deepcopy_internal(::MemoryRef{String}, ::IdDict{Any, Any})
InferenceTiming: 0.000638/0.205187 on Base.deepcopy_internal(::Vector{String}, ::IdDict{Any, Any})
InferenceTiming: 0.002084/0.212054 on Base.deepcopy_internal(::Dict{String, Union{String, Vector{String}}}, ::IdDict{Any, Any})
InferenceTiming: 1.228028/1.534484 on Core.Compiler.Timings.ROOT()
I did some initial investigation with SnoopCompile[Core]. I previously removed the invalidations by moving code to
Base
.Base.deepcopy_internal
is the large teal block below.