How to optimize Julia SDEs?
Published:
Hi all!. In this post I’ll show how to optimize the simulation of a Stochastic Differential Equations (SDEs) System written in Julia Language. To that end I’ll DifferentialEquations.jl and StaticArrays.jl libraries. Firstly, stack and heap memory types will be defined. Then, the Longstaff-Schwartz SDEs system will be defined, and then translated into Julia code. It’ll be written in two flavours: the in-place (iip) and out-of-place (oop) versions will be shown. For the oop system the StaticArrays.jl package will be used in order to provide stack allocated arrays. Finally, the two implementations will be benchmarked in both heap allocations and elapsed time for adaptive and non-adaptive discretization schemes.