Performance aspects #126
PierreMartinon
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
General notes: scripts for benchmarking / profiling are in
benchmark
folder:timev
,btime
,code_warntype
,JET
Summary:
Concerning the getters for the state/control variables at each time step:
StaticArrays
do not seem compatible with AD, raising asetindex
error even when using the supposedly mutableMVector
...similar
), however this does not seem to reduce allocations. This may due to the 'smart update' in the trapeze method where we copy some values from one time step to another to avoid recomputing the same dynamics twice. In particular some formulations compile and execute without errors, but with obviously wrong derivatives. Things may be easier to figure out a more standard scheme such as midpoint.Concerning the OCP functions calls:
x[]
does not work on a vector of size greater than 1. Current version returns scalar variables at the getters level. Using multiple dispatch with 8 methods (all possible scalar/vector cases) for the OCP functions was not better. Maybe reworking the OCP functions so that they take references (if feasible at all) could be an improvement ?Beta Was this translation helpful? Give feedback.
All reactions