Skip to content

Best method to compute gradients, Jacobians and Hessians #25933

Answered by moorepants
sandeep026 asked this question in Q&A
Discussion options

You must be logged in to vote

If you are concerned with the performance of numerical evaluation, then your A will most likely provide the fastest result.

If you are concerned with the performance of generating the numerical functions, then A may likely be slower than B and C.

Automatic differentiation is only "state of the art" in the sense that it allows you to differentiate more arbitrary numerical codes. But there is a performance cost for using these more generalized methods.

I show in this recent blog post a solution to a nonlinear optimization problem where careful implementations that follows your "A" gives very high performance numerical evaluation: https://mechmotum.github.io/blog/czi-sympy-wrapup.html which …

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@moorepants
Comment options

@moorepants
Comment options

@sandeep026
Comment options

@moorepants
Comment options

@moorepants
Comment options

Answer selected by sandeep026
Comment options

You must be logged in to vote
1 reply
@sandeep026
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants