Skip to content

Commit

Permalink
Improve TTFX
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored and AldoGl committed Oct 29, 2024
1 parent 591706a commit 98b1f09
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
MutableNamedTuples = "af6c499f-54b4-48cc-bbd2-094bba7533c7"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Expand All @@ -25,6 +26,7 @@ LinearAlgebra = "1"
MAT = "0.10"
MutableNamedTuples = "0.1.3"
Plots = "1"
PrecompileTools = "1"
Random = "1"
StatsBase = "0.34"
StatsPlots = "0.15"
Expand Down
3 changes: 3 additions & 0 deletions src/BeforeIT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,7 @@ include("utils/standard_calibration_data.jl")

# shocks
include("shocks/shocks.jl")

include("precompile.jl")

end
14 changes: 14 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

using PrecompileTools

@setup_workload let
parameters = BeforeIT.AUSTRIA2010Q1.parameters
initial_conditions = BeforeIT.AUSTRIA2010Q1.initial_conditions
T = 1
@compile_workload let
model = BeforeIT.init_model(parameters, initial_conditions, T)
data = BeforeIT.init_data(model);
BeforeIT.one_epoch!(model)
BeforeIT.update_data!(data, model)
end
end

0 comments on commit 98b1f09

Please sign in to comment.