This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RecipeDemo | |
export IsotropicGaussian, IsotropicGMM, IsotropicMultiGMM, nonrecipe! | |
using StaticArrays | |
struct IsotropicGaussian{N,T} | |
μ::SVector{N,T} | |
σ::T | |
ϕ::T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var documenterSearchIndex = {"docs": | |
[{"location":"invalidations.html#Why-does-Julia-invalidate-code?","page":"Invalidations","title":"Why does Julia invalidate code?","text":"","category":"section"},{"location":"invalidations.html","page":"Invalidations","title":"Invalidations","text":"Julia may be unique among computer languages in supporting all four of the following features:","category":"page"},{"location":"invalidations.html","page":"Invalidations","title":"Invalidations","text":"interactive development\n\"method overloading\" by packages that don't own the function\naggressive compilation\nconsistent compilation: same result no matter how you got there","category":"page"},{"location":"invalidations.html","page":"Invalidations","title":"Invalidations","text":"The combination of these features requires that you sometimes \"throw away\" code that you have previously compiled.","category":"page"},{"location":"invalidations.html","page":"Invalidations","title":"Invalidations","text":"To illustrate: suppose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From --trace-compile | |
precompile(Tuple{REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#133#189", String}, Any, Any}) | |
precompile(Tuple{REPL.LineEdit.var"#133#189", REPL.LineEdit.MIState, Any, Vararg{Any}}) | |
precompile(Tuple{typeof(REPL.LineEdit.is_non_word_char), Char}) | |
precompile(Tuple{REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#134#190", String}, Any, Any}) | |
precompile(Tuple{REPL.LineEdit.var"#134#190", REPL.LineEdit.MIState, Any, Vararg{Any}}) | |
precompile(Tuple{REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#147#203", String}, Any, Any}) | |
precompile(Tuple{REPL.LineEdit.var"#147#203", REPL.LineEdit.MIState, Any, Vararg{Any}}) | |
precompile(Tuple{typeof(Base.in!), REPL.REPLCompletions.PackageCompletion, Base.Set{REPL.REPLCompletions.Completion}}) | |
precompile(Tuple{typeof(REPL.REPLCompletions.completion_text), REPL.REPLCompletions.PackageCompletion}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp/pkgs/packages/DiffEqBase/ihYDa/src/solve.jl:479, MethodInstance for Core.kwcall(::NamedTuple{(:dt, :save_everystep, :callback, :maxiters), Tuple{Float64, Bool, CallbackSet{Tuple{}, Tuple{DiscreteCallback{typeof(Trixi.summary_callback), typeof(Trixi.summary_callback), typeof(Trixi.initialize_summary_callback), typeof(SciMLBase.FINALIZE_DEFAULT)}, DiscreteCallback{Trixi.var"#1131#1137"{Int64}, AnalysisCallback{Trixi.LobattoLegendreAnalyzer{Float64, 7, SVector{7, Float64}, Matrix{Float64}}, Tuple{typeof(Trixi.entropy_timederivative)}, SVector{4, Float64}, NamedTuple{(:u_local, :u_tmp1, :x_local, :x_tmp1, :jacobian_local, :jacobian_tmp1), Tuple{StrideArraysCore.StaticStrideArray{Float64, 3, (1, 2, 3), Tuple{Static.StaticInt{4}, Static.StaticInt{7}, Static.StaticInt{7}}, Tuple{Nothing, Nothing, Nothing}, Tuple{Static.StaticInt{1}, Static.StaticInt{1}, Static.StaticInt{1}}, 196}, StrideArraysCore.StaticStrideArray{Float64, 3, (1, 2, 3), Tuple{Static.StaticInt{4}, Static.StaticInt{7}, Static.StaticInt{4}}, Tupl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is machine-generated - editing it directly is not advised | |
julia_version = "1.9.0-DEV" | |
manifest_format = "2.0" | |
project_hash = "ea499c8374363a5ef12b75ab5c6758fdb9000a2c" | |
[[deps.ATK_jll]] | |
deps = ["Artifacts", "Glib_jll", "JLLWrappers", "Libdl", "Pkg"] | |
git-tree-sha1 = "58c36d8a1beeb12d63921bcfaa674baf30a1140e" | |
uuid = "7b86fcea-f67b-53e1-809c-8f1719c154e8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
using Pkg | |
Pkg.precompile() | |
catch | |
exit(125) # skip if we can't precompile Plots | |
end | |
cmtname, cmtsha = string(Base.VERSION), Base.GIT_VERSION_INFO.commit | |
tstart = time() | |
using Plots | |
tload = time() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CacheNative | |
using Random | |
const somearray = [1,2,3] | |
struct SomeType | |
str::String | |
end | |
# @noinline ensures these are compiled as stand-alone functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/precompile.jl b/src/precompile.jl | |
index 9b72977..eba10e0 100644 | |
--- a/src/precompile.jl | |
+++ b/src/precompile.jl | |
@@ -5,4 +5,5 @@ function _precompile_() | |
# CSV.Context(IOBuffer(CSV.PRECOMPILE_DATA)) | |
# foreach(row -> row, CSV.Rows(IOBuffer(PRECOMPILE_DATA))) | |
CSV.Context(joinpath(dirname(pathof(CSV)), "promotions.csv")) | |
+ CSV.File(joinpath(pkgdir(CSV), "test", "testfiles", "precompile.csv")) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> using Revise | |
[ Info: Precompiling Revise [295af30f-e4ad-537b-8983-00126c2a3abe] | |
external: 0; module-thunk: 0; worklist: 1 | |
external: 0; module-thunk: 0; worklist: 1 | |
external: 4746; module-thunk: 0; worklist: 318 | |
external: 6226; module-thunk: 0; worklist: 187 | |
external: 9211; module-thunk: 0; worklist: 298 | |
julia> using ImageCore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DataFrames, SnoopCompile, Statistics, ProfileView | |
# Note: load all packages first to prevent invalidation | |
d = DataFrame(n = 1:20, x = [3, 3, 3, 3, 1, 1, 1, 2, 1, 1, | |
2, 1, 1, 2, 2, 2, 3, 1, 1, 2]); | |
g = groupby(d, :x); | |
subset(g, :n => (n -> n .> mean(n))); # compile | |
select(g, :n => (n -> n .> mean(n))); # compile |
NewerOlder