Speed up solution system of ODEs

I think this thread asks the same question: How to know if object memory resides on stack or heap?. 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. 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.

3 Likes