# Speed up solution system of ODEs

**URL:** <https://discourse.julialang.org/t/speed-up-solution-system-of-odes/24620>\
**Category:** New to Julia\
**Tags:** diffeq\
**Created:** [May 26, 2019, 2:22pm UTC](https://discourse.julialang.org/t/speed-up-solution-system-of-odes/24620 "2019-05-26T14:22:00Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [June 2, 2019, 2:54pm UTC](https://discourse.julialang.org/t/speed-up-solution-system-of-odes/24620/19 "2019-06-02T14:54:06Z")

</div>

I think this thread asks the same question: [How to know if object memory resides on stack or heap?](https://discourse.julialang.org/t/how-to-know-if-object-memory-resides-on-stack-or-heap/4927). It seems that it’s not always very easy because it depends on the compiler’s current performance (since it depends on what it can prove, not on what is true).

I’m not sure why strings are heap allocated, but you can probably find some discussion on discourse or the issue tracker.

Maybe something that helps regarding the tuple example is Julia’s `isbitstype`. The tuple which contains a `Vector` will have `isbits(t) == false`. You can read more about that in the [manual](https://docs.julialang.org/en/v1/base/base/index.html#Base.isbitstype). It sounds like there isn’t a 1-1 correspondence between `isbits` and stack allocation, but I think it’s easier to stack allocate such objects.

At this point it’s pretty far from things I know well, so maybe someone else would have a more correct or more helpful answer.

---

_[View the full topic](https://discourse.julialang.org/t/speed-up-solution-system-of-odes/24620)._
