Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from SnoopPrecompile to PrecompileTools #98

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading