# My simulations are suddenly 5-10 times faster. Why?

**URL:** <https://discourse.julialang.org/t/my-simulations-are-suddenly-5-10-times-faster-why/136156>\
**Category:** General Usage\
**Tags:** question, differentialequation\
**Created:** [March 11, 2026, 7:22pm UTC](https://discourse.julialang.org/t/my-simulations-are-suddenly-5-10-times-faster-why/136156 "2026-03-11T19:22:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 11, 2026, 7:22pm UTC](https://discourse.julialang.org/t/my-simulations-are-suddenly-5-10-times-faster-why/136156/1 "2026-03-11T19:22:02Z")

</div>

I am running a simulation with about 70 states that uses the DFBDF implicit solver. See: [KiteModels.jl/examples/bench\_4p.jl at main · OpenSourceAWE/KiteModels.jl · GitHub](https://github.com/OpenSourceAWE/KiteModels.jl/blob/main/examples/bench_4p.jl)

Recently, I noticed a 5-10x increase in performance. I can now run my simulations at about 200x real time. I can run a simulation of 1000s duration in 5s.

Old:

```julia-auto
# Ryzen 7950X, Solver: DFBDF
# Total simulation time: 0.043 s
# Simulation speed: 116.99 times real-time.

```

New:

```julia-auto
# Ryzen 7950X, Solver: DFBDF, Julia 1.11, 04-03-2026
# Total simulation time: 0.006 s
# Simulation speed: 772.5 times real-time.

```

What could be the reason? Was the solver’s code improved? It now requires far fewer residual function evaluations to achieve the same accuracy (8 instead of 126). While this is a toy example, the full simulation also shows this speed advantage, even though it is only 200 times real-time under more complex environmental conditions.

What could be the reason?

I also updated many packages, fixed JETLS warnings, and improved the initial conditions. The initial conditions might matter in the toy example, but they cannot in the full example.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [March 11, 2026, 7:32pm UTC](https://discourse.julialang.org/t/my-simulations-are-suddenly-5-10-times-faster-why/136156/2 "2026-03-11T19:32:39Z")

</div>

@ChrisRackauckas has recently added a substantial number of optimizations to DFBDF (mostly better order control and jacobian reuse). I’m a bit surprised that we’re getting 10x improvement, but especially for DAEs we improved a lot of things.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [March 11, 2026, 7:33pm UTC](https://discourse.julialang.org/t/my-simulations-are-suddenly-5-10-times-faster-why/136156/3 "2026-03-11T19:33:57Z")

</div>

DFBDF, not surprised. Biggest change is the Jacobian split, less factorizations

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 11, 2026, 7:36pm UTC](https://discourse.julialang.org/t/my-simulations-are-suddenly-5-10-times-faster-why/136156/4 "2026-03-11T19:36:40Z")

</div>

Such a nice solver! 😍  
Let’s see how MTK compares.

But I had to set the `dtmax` parameter to avoid stability issues:

```yaml
dtmax: 0.025 # max internal step size of the DAE solver [s]; Inf means no limit

```
