-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization Ideas #186
Comments
Which loop?
The input is not 64-bit floats, it's type-matching to the user's input. I think in a similar sense it should be type matching, though having a multi-precision algorithm by default could be a good idea. |
Maybe @Vilin97 means the sum in Direct? (Though on taking a look now that is a cumulative sum so I guess not applicable.) For 1., what we discussed yesterday was that RSSA/RSSACR can get memory heavy for large systems since they store twice as many propensities and twice as many species populations (the bounding intervals). We could cut down the memory use for the former by using a coarser floating point type internally to store propensity bracketing values, and slightly expanding the bracketing interval. This should still preserve the algorithm's exactness. In spatial systems the memory use can grow pretty quick given the extreme number of jumps, so this could be an important optimization to allow that type of rejection approach there. |
I think for some finer performance details, it would be good to post a flame chart when proposing what to optimize. Anything that is 10% or less of the calculation shouldn't get over optimized. If you're talking about https://github.com/SciML/DiffEqJump.jl/blob/master/src/aggregators/direct.jl#L85-L88, that isn't amenable to |
Every SSA has a loop that updates rates of dependent reactions. For example, here it is for DirectCR: https://github.com/SciML/DiffEqJump.jl/blob/master/src/aggregators/directcr.jl#L130. |
That doesn't look amenable to SIMD even if it inlines the rate functions. |
A couple more optimizations that are worth exploring (since they do appear in parts that can be time consuming):
|
Another optimization: When all jumps are saved, can save jumps instead of the state, and reconstruct any given state from the sequence of jumps. This would improve memory usage on large systems. |
Just like there is a list of SSAs to consider implementing (#32), there are some optimizations of the existing SSAs to consider implementing. This issue will be the place to write them down so as not to forget. The possible optimizations so far are:
@simd
in the loop where propensities are being re-evaluated after executing a reaction.Other optimization ideas are welcome.
The text was updated successfully, but these errors were encountered: