- Using a ton of standard pervasive packages only helps 10%
- Getting DiffEqBase helps 50%
- Getting OrdinaryDiffEq without extra precompiles gets to 1.3 seconds, vs 0.6 seconds on the second run. That's pretty good!
Created
September 6, 2020 05:38
-
-
Save ChrisRackauckas/303768d93391f4f007288961450f2df3 to your computer and use it in GitHub Desktop.
Conservative package compiler testing
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 PackageCompiler | |
conservative = [ | |
:MacroTools | |
:MuladdMacro | |
:TimerOutputs | |
:ForwardDiff | |
:Plots | |
:Lazy | |
:StaticArrays | |
:BenchmarkTools | |
:Latexify | |
:Debugger | |
:Unitful | |
:IterativeSolvers | |
:Parameters | |
:Reexport | |
:NLsolve | |
:SpecialFunctions | |
:FiniteDiff | |
:SimpleTraits | |
:RecipesBase | |
:LabelledArrays | |
:AbstractFFTs | |
:UnPack | |
] | |
diffeqbase = [ | |
:DiffEqBase | |
] | |
ordinarydiffeq = [ | |
:OrdinaryDiffEq | |
] | |
PackageCompiler.create_sysimage(vcat(conservative,diffeqbase); | |
replace_default=true) | |
@time begin | |
using OrdinaryDiffEq | |
f(u,p,t) = 1.01*u | |
u0=1/2 | |
tspan = (0.0,1.0) | |
prob = ODEProblem(f,u0,tspan) | |
sol = solve(prob,Tsit5(),reltol=1e-8,abstol=1e-8) | |
end | |
# Before | |
10.289882 seconds (23.34 M allocations: 1.292 GiB, 4.54% gc time) | |
# After Conservative | |
9.634908 seconds (18.76 M allocations: 1.034 GiB, 4.11% gc time) | |
# After DiffEqBase | |
5.029686 seconds (8.19 M allocations: 439.332 MiB, 5.37% gc time) | |
# After OrdinaryDiffEq | |
1.310768 seconds (3.26 M allocations: 174.868 MiB, 10.44% gc time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment