# Squeezing performance out of ODE solves with interpolations

**URL:** <https://discourse.julialang.org/t/squeezing-performance-out-of-ode-solves-with-interpolations/73519>\
**Category:** Performance\
**Tags:** interpolations, differentialequation\
**Created:** [December 23, 2021, 5:26am UTC](https://discourse.julialang.org/t/squeezing-performance-out-of-ode-solves-with-interpolations/73519 "2021-12-23T05:26:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [December 23, 2021, 9:22am UTC](https://discourse.julialang.org/t/squeezing-performance-out-of-ode-solves-with-interpolations/73519/3 "2021-12-23T09:22:22Z")

</div>

There’s a lot that can be improved here. A big part of it is `searchsortedlast` performance, so someone can roll up their sleaves like in [Searchsortedlast performance](https://discourse.julialang.org/t/searchsortedlast-performance/72711) and really knock that down. We’ve done a little bit already,

[https://github.com/SciML/OrdinaryDiffEq.jl/blob/v6.0.3/src/dense/generic\_dense.jl#L7-L35](https://github.com/SciML/OrdinaryDiffEq.jl/blob/v6.0.3/src/dense/generic_dense.jl#L7-L35)

but the answer in that thread is that you don’t always want to do bisection, so that’s one major improvement. Some other things like caching the last index could also be done. It would be really good for someone to dig into this to see if they can find something to speed it up because indeed larger interpolations do take a bit.

Is the reverse here an adjoint equation?

---

_[View the full topic](https://discourse.julialang.org/t/squeezing-performance-out-of-ode-solves-with-interpolations/73519)._
