Skip to content

Commit

Permalink
Migrate from SnoopPrecompile to PrecompileTools (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Apr 26, 2023
1 parent 84b7c7e commit e56e534
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Yields = "d7e99b2f-e7f3-4d9e-9f01-2338fc023ad3"

Expand All @@ -21,7 +21,7 @@ FinanceCore = "^1"
ForwardDiff = "^0.10"
MuladdMacro = "^0.2"
QuadGK = "^2"
SnoopPrecompile = "^1"
PrecompileTools = "^1"
StatsBase = "^0.33"
Reexport = "^1.2"
Yields = "^2,^3"
Expand Down
2 changes: 1 addition & 1 deletion src/ActuaryUtilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using QuadGK
using MuladdMacro
using Yields
import StatsBase
using SnoopPrecompile
using PrecompileTools

include("financial_math.jl")
include("risk_measures.jl")
Expand Down
4 changes: 2 additions & 2 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# created with the help of SnoopCompile.jl
@precompile_setup begin
@setup_workload begin
# Putting some things in `setup` can reduce the size of the
# precompile file and potentially make loading faster.
cfs = [10 for i in 1:10]
Expand All @@ -12,7 +12,7 @@
y = Yields.CMT(rates,mats)
r = 0.05
rates = [r,y]
@precompile_all_calls begin
@compile_workload begin
# all calls in this block will be precompiled, regardless of whether
# they belong to your package or not (on Julia 1.8 and higher)
irr([-80;cfs])
Expand Down

0 comments on commit e56e534

Please sign in to comment.