EoM Optimization — A few questions after profiling #29512
Replies: 1 comment
-
You can possibly merge them, but ordering may matter. Substituting derivatives of a variable before the variable matters, for example.
We have created a currently prviate cse-jacobian function in a prior GSoC. This can be used but you need to study the speed info from the older issues/prs about it because it isn't always faster. There may even be a PR open about swappign this in (or giving the option to). Please complete that PR if so.
Same answer as above. cse -> diff -> undo cse is not necessarily faster and should be an option for the user. It should also use the function we created. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am Shuvro, a third-year CSE student from Bangladesh. I am planning to apply for the "Efficient Equations of Motion Generation" project this GSoC. Before finalising my proposal I wanted to share some profiling results and ask a few specific questions.
I spent the last few weeks running line_profiler on the real unmodified SymPy 1.15.0.dev source on my machine. For KanesMethod on a 5-link planar pendulum, _form_frstar takes up 94.6% of total kanes_equations() time. The three biggest costs inside it are the dot product loop at line 496 (36.2%), acc() at line 486 (22.6%), and two msubs() calls at lines 512–513 (7.4% combined). For LagrangesMethod at N=4, the jacobian and subs operations at lines 223–224 alone are 49.9% of total form_lagranges_equations() time (4.556s total).
I have three questions based on what I found:
Happy to share my profiling scripts and full results if that would be useful.
Thanks,
Shuvro Bhattacharjee
Sylhet Engineering College, Bangladesh
github.com/shuvro-git
Beta Was this translation helpful? Give feedback.
All reactions