Closed isaacsas closed 1 year ago
This seems to be the issue for Direct
:
Reading through this thread it seems like for a small enough number of jumps the most performant alternative is not manual splitting but building a Union type and storing the affects in a vector (NTuple?) with this type.
https://discourse.julialang.org/t/union-splitting-vs-c/61772/9
Union splitting is just doing the manual splitting at the compiler level.
Which seems to get better optimized from that thread (at least as of a few years ago).
I couldn't figure out how to have the compiler do it without converting to using a vector of the union type instead of a tuple, which seemed less ideal than manual splitting.
See https://discourse.julialang.org/t/memory-usage-while-solving-jumpproblem-increases-with-run-time-even-with-save-positions-false-false/96656/26
These don't seem to be an issue when using
DirectFW
from what I can tell. (There is a separate issue in that thread with Symbolics-generated functions via RuntimeGeneratedFunctions appearing to allocate too.)