# Mystery of invalidations in V\>1.10. Even in precompiled code

**URL:** https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081
**Category:** General Usage
**Tags:** regression, method-invalidation, ttfp, ttfx
**Created:** [September 3, 2025, 8:31pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081 "2025-09-03T20:31:29Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [September 3, 2025, 8:31pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/1 "2025-09-03T20:31:29Z")

</div>

I have reported before the very large degradation in TTFP in GMT for version 1.11 and later. One example as reminder

```julia-auto
  | | |_| | | | (_| | | Version 1.10.10 (2025-06-27)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ 

julia> @time @eval plot(rand(5,2))
  2.415636 seconds (8.13 M allocations: 550.066 MiB, 5.43% gc time, 99.86% compilation time: 24% of which was recompilation)

  | | |_| | | | (_| | | Version 1.13.0-DEV.1065 (2025-08-29)
 _/ |\ __'_|_|_|\__'_| | Commit 3396562934 (4 days old master)
|__/ |

julia> @time @eval plot(rand(5,2))
  6.430101 seconds (24.71 M allocations: 1.307 GiB, 3.36% gc time, 99.95% compilation time: 99% of which was recompilation)

```

I also want to emphasize that this example is part (in fact the [last one](https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L431)) of the workflow of PrecompileTools. So that example should be precompiled and execute ~immediately

I have spent countless hours trying to figure out how, or at least minimize, these regressions but essentially the recoveries were minuscule. But now the @trace\_compile macro is reporting more convincing numbers. And what do we see?

How come that so many Julia functions are brought to compilation when running this example?  
Note that the first one is:

```julia-auto
#= 6.6 ms =# precompile(Tuple{typeof(Base.rand), Int64, Int64})

```

So the rand function with two integers in not compiled in the Julia image?

And near the end

```julia-auto
#= 6127.9 ms =# precompile(Tuple{typeof(GMT.plot), Array{Float64, 2}}) # recompile

```

The `plot` is (re)compiled again? But why? Again, PrecompileTools compiled that exact same function call so it should live in precompiled cache.

I also looked with SnoopCompile and found only 6 invalidations in the entire GMT code, and of those 5 happen in SparseArrays.

Don’t know what to do to solve these regressions and time goes by and situation does not improve (recover).

```julia-auto
julia> @trace_compile @eval plot(rand(5,2))
#= 6.6 ms =# precompile(Tuple{typeof(Base.rand), Int64, Int64})
#= 2.9 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:limit, :keepempty), Tuple{Int64, Bool}}, typeof(Base.eachsplit), String, Char})
#= 2.5 ms =# precompile(Tuple{Base.var"##eachsplit#425", Int64, Bool, typeof(Base.eachsplit), String, Char})
#= 4.8 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:limit, :keepempty), Tuple{Int64, Bool}}, typeof(Base.eachsplit), String, Function})
#= 4.1 ms =# precompile(Tuple{Base.var"##eachsplit#423", Int64, Bool, typeof(Base.eachsplit), String, Function})
#= 2.5 ms =# precompile(Tuple{Type{Base.SplitIterator{S, F} where F where S<:AbstractString}, String, Base.Fix{2, typeof(Base.isequal), Char}, Int64, Bool})
#= 4.6 ms =# precompile(Tuple{typeof(Base.getproperty), Base.SplitIterator{String, Base.Fix{2, typeof(Base.isequal), Char}}, Symbol})
#= 2.9 ms =# precompile(Tuple{typeof(Base.Iterators.product), Base.UnitRange{Int64}, Vararg{Any}})
#= 2.7 ms =# precompile(Tuple{typeof(Base.to_shape), Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}})
#= 4.8 ms =# precompile(Tuple{typeof(Base._array_for), Type{Symbol}, Base.HasShape{1}, Tuple{Base.OneTo{Int64}}})
#= 15.1 ms =# precompile(Tuple{typeof(Base.collect_to_with_first!), Array{Symbol, 1}, Symbol, Base.Generator{Base.UnitRange{Int64}, Base.var"#_ntuple##0#_ntuple##1"{Base.Compiler.var"#tuple_tfunc##0#tuple_tfunc##1"{Array{Any, 1}}}}, Int64})
#= 73.7 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:F, :D, :par), Tuple{String, String, Tuple{Symbol, String}}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 2.9 ms =# precompile(Tuple{typeof(Base.Broadcast._getindex), Tuple{Int64}, Int64})
#= 77.8 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{String}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 11.9 ms =# precompile(Tuple{typeof(Base.Broadcast.broadcastable), Int64})
#= 3.0 ms =# precompile(Tuple{typeof(Base.convert), Type{UInt32}, Int32})
#= 6.2 ms =# precompile(Tuple{Type{Int64}, Char})
#= 2.8 ms =# precompile(Tuple{typeof(Base.split_sign), Int64})
#= 3.0 ms =# precompile(Tuple{typeof(Base.indexed_iterate), Tuple{UInt64, Bool}, Int64})
#= 3.1 ms =# precompile(Tuple{typeof(Base.indexed_iterate), Tuple{UInt64, Bool}, Int64, Int64})
#= 1.9 ms =# precompile(Tuple{typeof(Base.abs), UInt64})
#= 2.2 ms =# precompile(Tuple{typeof(Base.unsigned), UInt64})
#= 2.2 ms =# precompile(Tuple{typeof(Base.top_set_bit), UInt64})
#= 74.4 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, V, Nothing, NT} where NT<:(NamedTuple{names, T} where T<:Tuple where names) where V}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 3.0 ms =# precompile(Tuple{Type{UInt32}, Int32})
#= 3.0 ms =# precompile(Tuple{typeof(Base.to_indices), Array{String, 1}, Tuple{Base.UnitRange{Int64}}})
#= 2.5 ms =# precompile(Tuple{typeof(Base.map), Base.var"#view##0#view##1"{Array{String, 1}}, Tuple{Base.UnitRange{Int64}}})
#= 2.1 ms =# precompile(Tuple{typeof(Base._maybe_reshape_parent), Array{String, 1}, Tuple{Bool}})
#= 2.0 ms =# precompile(Tuple{typeof(Base.reshape), Array{String, 1}, Base.Val{1}})
#= 3.2 ms =# precompile(Tuple{typeof(Base.unsafe_view), Array{String, 1}, Base.UnitRange{Int64}})
#= 3.3 ms =# precompile(Tuple{Type{Base.SubArray{T, N, P, I, L} where L where I where P where N where T}, Array{String, 1}, Tuple{Base.UnitRange{Int64}}})
#= 2.4 ms =# precompile(Tuple{typeof(Base.ensure_indexable), Tuple{Base.UnitRange{Int64}}})
#= 3.1 ms =# precompile(Tuple{Type{Base.SubArray{T, N, P, I, L} where L where I where P where N where T}, Base.IndexLinear, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, Tuple{Bool}})
#= 2.0 ms =# precompile(Tuple{typeof(Base.compute_offset1), Array{String, 1}, Int64, Tuple{Base.UnitRange{Int64}}})
#= 2.8 ms =# precompile(Tuple{Type{Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}}, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, Int64, Int64})
#= 2.9 ms =# precompile(Tuple{typeof(Base.axes), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}})
#= 3.2 ms =# precompile(Tuple{typeof(Base.checkbounds), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}, Int64})
#= 4.4 ms =# precompile(Tuple{typeof(Base.getproperty), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}, Symbol})
#= 2.8 ms =# precompile(Tuple{typeof(Base._reindexlinear), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}, Int64})
#= 75.3 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:T, :f), Tuple{String, String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 9.6 ms =# precompile(Tuple{typeof(Base.Compiler.EscapeAnalysis.escape_builtin!), typeof(Core.finalizer), Base.Compiler.EscapeAnalysis.AnalysisState{Base.Compiler.GetNativeEscapeCache{Base.Compiler.WorldView{Base.Compiler.InternalCodeCache}}, Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}, Int64, Array{Any, 1}})
#= 2.7 ms =# precompile(Tuple{typeof(Base.:(>)), Int64})
#= 4.7 ms =# precompile(Tuple{typeof(Base.all), Function, Tuple{Int64, Int64}})
#= 3.5 ms =# precompile(Tuple{typeof(Base._all), Base.Fix{2, typeof(Base.:(>)), Int64}, Tuple{Int64, Int64}, Base.Colon})
#= 4.9 ms =# precompile(Tuple{typeof(Base.findfirst), Function, Tuple{Int64, Int64}})
#= 2.2 ms =# precompile(Tuple{Base.Fix{2, typeof(Base.:(>)), Int64}, Int64})
#= 3.2 ms =# precompile(Tuple{typeof(Base.Broadcast.broadcasted), typeof(Base.:(+)), Int64, Base.UnitRange{Int64}})
#= 1.9 ms =# precompile(Tuple{typeof(Base.Broadcast.materialize), Base.UnitRange{Int64}})
#= 3.2 ms =# precompile(Tuple{typeof(Base.:(var"==")), Function, Function})
#= 68.3 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:J,), Tuple{String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 78.4 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, T, Nothing, A} where A<:(NamedTuple{(:R, :J), var"#s185"} where var"#s185"<:Tuple{Union{Array{Any, 1}, Array{Float64, 1}}, String}) where T}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 5.0 ms =# precompile(Tuple{typeof(Base._array_for), Type{Tuple{String, typeof(GMT.arg2str), Int64}}, Base.HasShape{1}, Tuple{Base.OneTo{Int64}}}) # recompile
#= 16.9 ms =# precompile(Tuple{typeof(Base.collect_to_with_first!), Array{Tuple{String, typeof(GMT.arg2str), Int64}, 1}, Tuple{String, typeof(GMT.arg2str), Int64}, Base.Generator{Base.UnitRange{Int64}, Base.var"#_ntuple##0#_ntuple##1"{Base.Compiler.var"#tuple_tfunc##0#tuple_tfunc##1"{Array{Any, 1}}}}, Int64})
#= 36.2 ms =# precompile(Tuple{typeof(Base.setindex_widen_up_to), Array{Tuple{String, typeof(GMT.arg2str), Int64}, 1}, Tuple{String, typeof(GMT.arg2str)}, Int64})
#= 10.6 ms =# precompile(Tuple{typeof(Base.collect_to!), Array{Tuple{String, typeof(GMT.arg2str), Vararg{Int64}}, 1}, Base.Generator{Base.UnitRange{Int64}, Base.var"#_ntuple##0#_ntuple##1"{Base.Compiler.var"#tuple_tfunc##0#tuple_tfunc##1"{Array{Any, 1}}}}, Int64, Int64})
#= 21.9 ms =# precompile(Tuple{typeof(Base.setindex_widen_up_to), Array{Tuple{String, typeof(GMT.arg2str), Vararg{Int64}}, 1}, String, Int64})
#= 3.1 ms =# precompile(Tuple{typeof(Base.structdiff), NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}, Type{NamedTuple{(:clip,), T} where T<:Tuple}})
#= 2.8 ms =# precompile(Tuple{typeof(Base._new_NamedTuple), Type{NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}}, Tuple{Float64, String, Int64}})
#= 2.6 ms =# precompile(Tuple{typeof(Base.pairs), NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}})
#= 2.8 ms =# precompile(Tuple{Type{Base.Pairs{Symbol, V, I, A} where A where I where V}, NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}, Nothing})
#= 74.8 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 74.7 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:f, :s), Tuple{String, String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 73.1 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:pos, :B, :Vd), Tuple{NamedTuple{(:anchor,), Tuple{String}}, String, Int64}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 74.4 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Int64, Nothing, NamedTuple{(:Vd,), Tuple{Int64}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 71.6 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:R,), Tuple{String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 2.7 ms =# precompile(Tuple{typeof(Base.:(+)), Vararg{Int64, 4}})
#= 75.1 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Bool, Nothing, NamedTuple{(:gdataset,), Tuple{Bool}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 74.4 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, NTuple{4, Float64}, Nothing, NamedTuple{(:R,), Tuple{NTuple{4, Float64}}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 75.9 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:J, :C, :F), Tuple{String, Bool, Bool}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 86.4 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate_2arg#abstract_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:Q, :o), Tuple{Bool, String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
#= 6127.9 ms =# precompile(Tuple{typeof(GMT.plot), Array{Float64, 2}}) # recompile
#= 8.9 ms =# precompile(Tuple{typeof(Base.mapreducedim!), Function, Function, Array{Tuple{Float64, Float64}, 2}, Array{Float64, 2}})
#= 24.6 ms =# precompile(Tuple{typeof(Base.convert), Type{Array{Union{Int64, String}, 1}}, Array{Int64, 1}})
#= 51.1 ms =# precompile(Tuple{typeof(GMT.add_opt_cpt), Base.Dict{Symbol, Any}, String, Array{Symbol, 2}, Char, Int64, GMT.GMTdataset{Float64, 2}, Nothing, Bool, Bool, String, Bool}) # recompile
#= 522.6 ms =# precompile(Tuple{typeof(GMT.prep_and_call_finish_PS_module), Base.Dict{Symbol, Any}, Array{String, 1}, String, Bool, Bool, Bool, GMT.GMTdataset{Float64, 2}, Nothing, Nothing, Nothing}) # recompile
#= 8.2 ms =# precompile(Tuple{typeof(Base.map), Type{UInt8}, NTuple{32, Char}})

```

---

<div class="post-metadata">

### Author: ![simsurace](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simsurace/32/30216_2.png) [@simsurace](https://discourse.julialang.org/u/simsurace)
#### Post date: [September 3, 2025, 8:45pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/2 "2025-09-03T20:45:57Z")

</div>

Doesn‘t PrecompileTools just generate these precompile statements and execute them? Do you see the same time if you manually put the precompile statements?

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [September 3, 2025, 9:20pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/4 "2025-09-03T21:20:52Z")

</div>

As of recently I’m again working on improving the resistance of the sysimage to invalidation. Which amounts to fixing guilty type instabilities in `Base`, JuliaSyntax.jl, or in the stdlibs that are included in the sysimage, such as Random.jl.

However I really hope we can get some testing against sysimage invalidation into Julia’s test suite, otherwise my efforts may be futile.

Issue:

> <https://github.com/JuliaLang/julia/issues/47022>
>
> Invalidation fixes to Julia base are currently not tested. For example:
> 
> \- htt…ps://github.com/JuliaLang/julia/pull/46761
> \- https://github.com/JuliaLang/julia/pull/44091
> \- https://github.com/JuliaLang/julia/pull/41877
> 
> This is asking for double work in the long run. Would it be possible to add something like \`SnoopCompileCore.@snoopr\` to Julia base? This would make it easier to add a tests. For example, https://github.com/JuliaLang/julia/pull/46481 fixes invalidations caused by inserting:
> 
> \`\`\`julia
> Base.:(!)(::True) = False()
> \`\`\`
> 
> With \`@snoopr\` defined as
> 
> https://github.com/timholy/SnoopCompile.jl/blob/f4d9a7b57a82c1bdb34579f255d3cf4abcc10b92/SnoopCompileCore/src/snoopr.jl#L26-L35
> 
> the method insertion could be tested with:
> 
> \`\`\`julia
> @test isempty(@snoopr Base.:(!)(::True) = False())
> \`\`\`
> 
> cc: @timholy, @ranocha

NB: StyledStrings.jl still does some type piracy which is not guarded against with inference barriers, and both REPL.jl and Pkg.jl load StyledStrings.jl. So that’s another source of invalidation, in interactive use or when Pkg.jl is loaded.

Issue comment:

> <https://github.com/JuliaLang/julia/issues/57997#issuecomment-3223239087>
>
> On e89294840e5 (Version 1.12.0-DEV.2136 (2025-03-26))
> 
> \`\`\`julia
> julia\> using Pkg…
> 
> julia\> Pkg.UPDATED\_REGISTRY\_THIS\_SESSION\[\] = true
> true
> 
> julia\> ENV\["JULIA\_PKG\_PRECOMPILE\_AUTO"\] = 0
> 0
> 
> julia\> @time @eval Pkg.add("Example")
> Resolving package versions...
> No packages added to or removed from \`~/.julia/environments/v1.12/Project.toml\`
> No packages added to or removed from \`~/.julia/environments/v1.12/Manifest.toml\`
> 0.290076 seconds (1.25 M allocations: 77.722 MiB, 5.93% gc time, 89.65% compilation time: 79% of which was recompilation)
> \`\`\`
> 
> On (c175ace780d72340c065) \`1.12.0-beta1\`
> 
> \`\`\`julia
> julia\> using Pkg
> 
> julia\> Pkg.UPDATED\_REGISTRY\_THIS\_SESSION\[\] = true
> true
> 
> julia\> ENV\["JULIA\_PKG\_PRECOMPILE\_AUTO"\] = 0
> 0
> 
> julia\> @time @eval Pkg.add("Example")
> Resolving package versions...
> No packages added to or removed from \`~/.julia/environments/v1.12/Project.toml\`
> No packages added to or removed from \`~/.julia/environments/v1.12/Manifest.toml\`
> 1.267370 seconds (6.99 M allocations: 377.474 MiB, 7.84% gc time, 98.18% compilation time: 82% of which was recompilation)
> \`\`\`

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [September 3, 2025, 9:30pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/5 "2025-09-03T21:30:16Z")

</div>

Yes, I’ve tried all of that. Manual precomp instructions, overlapping or nor the PrecompileToolls version. Partial precompile calls like [GMT.jl/src/GMT.jl at master · GenericMappingTools/GMT.jl · GitHub](https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L430), etc. Nill

---

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [September 3, 2025, 11:08pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/6 "2025-09-03T23:08:04Z")

</div>

> [@joa-quim](#):
>
> the [last one](https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L431)

Is this a wrong link, I don’t see a `@compile_workload` block anywhere.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [September 4, 2025, 12:09am UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/7 "2025-09-04T00:09:16Z")

</div>

Yes.  
It has a [@setup\_workload](https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L375), which I think does the same thing. At least the result is the same.

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [September 4, 2025, 12:32am UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/8 "2025-09-04T00:32:02Z")

</div>

> [@joa-quim](#):
>
> It has a [@setup\_workload](https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L375), which I think does the same thing.

The PrecompileTools.jl documentation disagrees.

---

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [September 4, 2025, 4:43am UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/9 "2025-09-04T04:43:23Z")

</div>

To save a few clicks, `@setup_workload` specifies the preparatory calls that aren’t necessarily put into the precompile cache, and `@compile_workload` specifies all its calls go into the precompile cache. If you intend calls to go into the precompile cache, you should make that change. That said, `precompile` calls or direct calls at top-level should also contribute to the precompile cache, albeit more limited by inferrability and module ownership than `@compiled_workload`. Manual `precompile`s failing is a problem that could affect `@compile_workload`.

---

<div class="post-metadata">

### Author: ![jakobnissen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jakobnissen/32/13477_2.png) [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)
#### Post date: [September 4, 2025, 7:06am UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/10 "2025-09-04T07:06:48Z")

</div>

Some of it may be a straight up limitation (bug?) in Julia: [`pkgimages` cannot include / pre-compile certain code (☔ umbrella issue) · Issue #58759 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/58759)

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [September 4, 2025, 8:30am UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/11 "2025-09-04T08:30:53Z")

</div>

I was not clear in my answer but I also tried with `@compile_workload` and got the same results. And not forget also that we are talking about a striking difference between version 1.10 and later.

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [September 7, 2025, 3:42pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081/12 "2025-09-07T15:42:15Z")

</div>

A ticket on Github follows up on this discussion:

> <https://github.com/JuliaLang/julia/issues/59494>
>
> See also \[this \](url) Forum post
> 
> Version 1.11 and ahead have very large regress…ion on TTFP with GMT codes.
> 
> \`\`\`
> | | |\_| | | | (\_| | | Version 1.10.10 (2025-06-27)
> \_/ |\\\_\_'\_|\_|\_|\\\_\_'\_| | Official https://julialang.org/ release
> |\_\_/ |
> 
> julia\> using GMT
> 
> julia\> @time @eval plot(rand(5,2))
> 2.366811 seconds (7.95 M allocations: 538.542 MiB, 4.96% gc time, 99.88% compilation time: 23% of which was recompilation)
> 
> 
> | | |\_| | | | (\_| | | Version 1.13.0-DEV.1081 (2025-09-04)
> \_/ |\\\_\_'\_|\_|\_|\\\_\_'\_| | Commit b9bcc03fc2 (1 day old master)
> |\_\_/ |
> 
> julia\> using GMT
> 
> julia\> @time @eval plot(rand(5,2))
> 6.600449 seconds (26.31 M allocations: 1.396 GiB, 3.36% gc time, 99.95% compilation time: 100% of which was recompilation)
> \`\`\`
> 
> Note that this \`plot(rand(5,2))\` command is part of PrecompileTools workload. It's actually the \[last \](https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L433)one.
> 
> If we look at the \`@trace\_compile\` output we see that there a lot compilations (from Julia functions???, rand()???) and recompilations. Namely, the \`plot\` function is recompiled, even if it was the last precompiled command.
> 
> I also notice that since the Forum post (a few days ago) and now, a new function (\`GMT.read\_data\`) is now being recompiled too (it wasn't before).
> 
> I added \`loose half the precompilation work\` to title because if I don't have in the precompilation workload than TTFP is ~12 sec, the double of current case, which is ~3 times longer than that of Julia 1.10
> 
> \`\`\`
> \#= 6166.4 ms =# precompile(Tuple{typeof(GMT.plot), Array{Float64, 2}}) # recompile
> \#= 2.7 ms =# precompile(Tuple{typeof(GMT.read\_data), Base.Dict{Symbol, Any}, String, String, GMT.GMTdataset{Float64, 2}, String, Bool}) # recompile
> \#= 57.4 ms =# precompile(Tuple{typeof(GMT.add\_opt\_cpt), Base.Dict{Symbol, Any}, String, Array{Symbol, 2}, Char, Int64, GMT.GMTdataset{Float64, 2}, Nothing, Bool, Bool, String, Bool}) # recompile
> \#= 518.4 ms =# precompile(Tuple{typeof(GMT.prep\_and\_call\_finish\_PS\_module), Base.Dict{Symbol, Any}, Array{String, 1}, String, Bool, Bool, Bool, GMT.GMTdataset{Float64, 2}, Nothing, Nothing, Nothing}) # recompile
> \`\`\`
> 
> The full \`@trace\_compile\` output
> 
> \`\`\`
> julia\> @trace\_compile @eval plot(rand(5,2))
> \#= 2.4 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:limit, :keepempty), Tuple{Int64, Bool}}, typeof(Base.eachsplit), String, Char})
> \#= 2.6 ms =# precompile(Tuple{Base.var"##eachsplit#425", Int64, Bool, typeof(Base.eachsplit), String, Char})
> \#= 2.6 ms =# precompile(Tuple{Type{Base.SplitIterator{S, F} where F where S\<:AbstractString}, String, Base.Fix{2, typeof(Base.isequal), Char}, Int64, Bool})
> \#= 4.4 ms =# precompile(Tuple{typeof(Base.getproperty), Base.SplitIterator{String, Base.Fix{2, typeof(Base.isequal), Char}}, Symbol})
> \#= 2.6 ms =# precompile(Tuple{typeof(Base.to\_shape), Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}})
> \#= 4.3 ms =# precompile(Tuple{typeof(Base.\_array\_for), Type{Symbol}, Base.HasShape{1}, Tuple{Base.OneTo{Int64}}})
> \#= 26.0 ms =# precompile(Tuple{typeof(Base.collect\_to\_with\_first!), Array{Symbol, 1}, Symbol, Base.Generator{Base.UnitRange{Int64}, Base.var"#\_ntuple##0#\_ntuple##1"{Base.Compiler.var"#tuple\_tfunc##0#tuple\_tfunc##1"{Array{Any, 1}}}}, Int64})
> \#= 71.5 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:F, :D, :par), Tuple{String, String, Tuple{Symbol, String}}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 2.9 ms =# precompile(Tuple{typeof(Base.convert), Type{UInt32}, Int32})
> \#= 82.4 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{String}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 6.1 ms =# precompile(Tuple{Type{Int64}, Char})
> \#= 2.4 ms =# precompile(Tuple{typeof(Base.split\_sign), Int64})
> \#= 2.9 ms =# precompile(Tuple{typeof(Base.indexed\_iterate), Tuple{UInt64, Bool}, Int64})
> \#= 2.8 ms =# precompile(Tuple{typeof(Base.indexed\_iterate), Tuple{UInt64, Bool}, Int64, Int64})
> \#= 1.7 ms =# precompile(Tuple{typeof(Base.abs), UInt64})
> \#= 1.7 ms =# precompile(Tuple{typeof(Base.unsigned), UInt64})
> \#= 1.9 ms =# precompile(Tuple{typeof(Base.top\_set\_bit), UInt64})
> \#= 2.7 ms =# precompile(Tuple{typeof(Base.Broadcast.\_getindex), Tuple{Int64}, Int64})
> \#= 2.4 ms =# precompile(Tuple{typeof(Base.Broadcast.broadcastable), Int64})
> \#= 73.1 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, V, Nothing, NT} where NT\<:(NamedTuple{names, T} where T\<:Tuple where names) where V}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 3.2 ms =# precompile(Tuple{Type{UInt32}, Int32})
> \#= 2.9 ms =# precompile(Tuple{typeof(Base.to\_indices), Array{String, 1}, Tuple{Base.UnitRange{Int64}}})
> \#= 2.2 ms =# precompile(Tuple{typeof(Base.map), Base.var"#view##0#view##1"{Array{String, 1}}, Tuple{Base.UnitRange{Int64}}})
> \#= 2.0 ms =# precompile(Tuple{typeof(Base.\_maybe\_reshape\_parent), Array{String, 1}, Tuple{Bool}})
> \#= 1.7 ms =# precompile(Tuple{typeof(Base.reshape), Array{String, 1}, Base.Val{1}})
> \#= 2.7 ms =# precompile(Tuple{typeof(Base.unsafe\_view), Array{String, 1}, Base.UnitRange{Int64}})
> \#= 2.8 ms =# precompile(Tuple{Type{Base.SubArray{T, N, P, I, L} where L where I where P where N where T}, Array{String, 1}, Tuple{Base.UnitRange{Int64}}})
> \#= 2.1 ms =# precompile(Tuple{typeof(Base.ensure\_indexable), Tuple{Base.UnitRange{Int64}}})
> \#= 2.9 ms =# precompile(Tuple{Type{Base.SubArray{T, N, P, I, L} where L where I where P where N where T}, Base.IndexLinear, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, Tuple{Bool}})
> \#= 2.0 ms =# precompile(Tuple{typeof(Base.compute\_offset1), Array{String, 1}, Int64, Tuple{Base.UnitRange{Int64}}})
> \#= 2.6 ms =# precompile(Tuple{Type{Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}}, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, Int64, Int64})
> \#= 2.7 ms =# precompile(Tuple{typeof(Base.axes), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}})
> \#= 3.6 ms =# precompile(Tuple{typeof(Base.checkbounds), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}, Int64})
> \#= 4.6 ms =# precompile(Tuple{typeof(Base.getproperty), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}, Symbol})
> \#= 2.5 ms =# precompile(Tuple{typeof(Base.\_reindexlinear), Base.SubArray{String, 1, Array{String, 1}, Tuple{Base.UnitRange{Int64}}, true}, Int64})
> \#= 71.2 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:T, :f), Tuple{String, String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 9.3 ms =# precompile(Tuple{typeof(Base.Compiler.EscapeAnalysis.escape\_builtin!), typeof(Core.finalizer), Base.Compiler.EscapeAnalysis.AnalysisState{Base.Compiler.GetNativeEscapeCache{Base.Compiler.WorldView{Base.Compiler.InternalCodeCache}}, Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}, Int64, Array{Any, 1}})
> \#= 2.7 ms =# precompile(Tuple{typeof(Base.:(\>)), Int64})
> \#= 3.4 ms =# precompile(Tuple{typeof(Base.\_all), Base.Fix{2, typeof(Base.:(\>)), Int64}, Tuple{Int64, Int64}, Base.Colon})
> \#= 2.1 ms =# precompile(Tuple{Base.Fix{2, typeof(Base.:(\>)), Int64}, Int64})
> \#= 2.7 ms =# precompile(Tuple{typeof(Base.Broadcast.broadcasted), typeof(Base.:(+)), Int64, Base.UnitRange{Int64}})
> \#= 1.8 ms =# precompile(Tuple{typeof(Base.Broadcast.materialize), Base.UnitRange{Int64}})
> \#= 3.1 ms =# precompile(Tuple{typeof(Base.:(var"==")), Function, Function})
> \#= 83.2 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:J,), Tuple{String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 73.5 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, T, Nothing, A} where A\<:(NamedTuple{(:R, :J), var"#s185"} where var"#s185"\<:Tuple{Union{Array{Any, 1}, Array{Float64, 1}}, String}) where T}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 4.9 ms =# precompile(Tuple{typeof(Base.\_array\_for), Type{Tuple{String, typeof(GMT.arg2str), Int64}}, Base.HasShape{1}, Tuple{Base.OneTo{Int64}}}) # recompile
> \#= 16.6 ms =# precompile(Tuple{typeof(Base.collect\_to\_with\_first!), Array{Tuple{String, typeof(GMT.arg2str), Int64}, 1}, Tuple{String, typeof(GMT.arg2str), Int64}, Base.Generator{Base.UnitRange{Int64}, Base.var"#\_ntuple##0#\_ntuple##1"{Base.Compiler.var"#tuple\_tfunc##0#tuple\_tfunc##1"{Array{Any, 1}}}}, Int64})
> \#= 34.6 ms =# precompile(Tuple{typeof(Base.setindex\_widen\_up\_to), Array{Tuple{String, typeof(GMT.arg2str), Int64}, 1}, Tuple{String, typeof(GMT.arg2str)}, Int64})
> \#= 10.9 ms =# precompile(Tuple{typeof(Base.collect\_to!), Array{Tuple{String, typeof(GMT.arg2str), Vararg{Int64}}, 1}, Base.Generator{Base.UnitRange{Int64}, Base.var"#\_ntuple##0#\_ntuple##1"{Base.Compiler.var"#tuple\_tfunc##0#tuple\_tfunc##1"{Array{Any, 1}}}}, Int64, Int64})
> \#= 21.8 ms =# precompile(Tuple{typeof(Base.setindex\_widen\_up\_to), Array{Tuple{String, typeof(GMT.arg2str), Vararg{Int64}}, 1}, String, Int64})
> \#= 3.2 ms =# precompile(Tuple{typeof(Base.structdiff), NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}, Type{NamedTuple{(:clip,), T} where T\<:Tuple}})
> \#= 3.2 ms =# precompile(Tuple{typeof(Base.\_new\_NamedTuple), Type{NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}}, Tuple{Float64, String, Int64}})
> \#= 3.4 ms =# precompile(Tuple{typeof(Base.pairs), NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}})
> \#= 3.5 ms =# precompile(Tuple{Type{Base.Pairs{Symbol, V, I, A} where A where I where V}, NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}, Nothing})
> \#= 71.5 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:W, :A, :Vd), Tuple{Float64, String, Int64}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 67.0 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:f, :s), Tuple{String, String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 74.6 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:pos, :B, :Vd), Tuple{NamedTuple{(:anchor,), Tuple{String}}, String, Int64}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 77.0 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Int64, Nothing, NamedTuple{(:Vd,), Tuple{Int64}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 72.8 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, String, Nothing, NamedTuple{(:R,), Tuple{String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 2.6 ms =# precompile(Tuple{typeof(Base.:(+)), Vararg{Int64, 4}})
> \#= 69.5 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Bool, Nothing, NamedTuple{(:gdataset,), Tuple{Bool}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 73.1 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, NTuple{4, Float64}, Nothing, NamedTuple{(:R,), Tuple{NTuple{4, Float64}}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 67.8 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:J, :C, :F), Tuple{String, Bool, Bool}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 67.3 ms =# precompile(Tuple{Base.Compiler.var"#inferiterate\_2arg#abstract\_iteration##1"{Base.Compiler.InferenceLattice{Base.Compiler.ConditionalsLattice{Base.Compiler.PartialsLattice{Base.Compiler.ConstsLattice}}}, Array{Any, 1}, Array{Base.Compiler.CallMeta, 1}, Type{Base.Pairs{Symbol, Any, Nothing, NamedTuple{(:Q, :o), Tuple{Bool, String}}}}, Base.Compiler.Future{Base.Compiler.AbstractIterationResult}}, Base.Compiler.NativeInterpreter, Base.Compiler.InferenceState})
> \#= 6166.4 ms =# precompile(Tuple{typeof(GMT.plot), Array{Float64, 2}}) # recompile
> \#= 2.7 ms =# precompile(Tuple{typeof(GMT.read\_data), Base.Dict{Symbol, Any}, String, String, GMT.GMTdataset{Float64, 2}, String, Bool}) # recompile
> \#= 57.4 ms =# precompile(Tuple{typeof(GMT.add\_opt\_cpt), Base.Dict{Symbol, Any}, String, Array{Symbol, 2}, Char, Int64, GMT.GMTdataset{Float64, 2}, Nothing, Bool, Bool, String, Bool}) # recompile
> \#= 518.4 ms =# precompile(Tuple{typeof(GMT.prep\_and\_call\_finish\_PS\_module), Base.Dict{Symbol, Any}, Array{String, 1}, String, Bool, Bool, Bool, GMT.GMTdataset{Float64, 2}, Nothing, Nothing, Nothing}) # recompile
> \`\`\`
