Skip to content

use cpython to convert derivative function to c code #8

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

Open
cwliu007 opened this issue Dec 13, 2014 · 1 comment
Open

use cpython to convert derivative function to c code #8

cwliu007 opened this issue Dec 13, 2014 · 1 comment

Comments

@cwliu007
Copy link

Hi,

Can the derivative functions, Jacobian and Hessian, produced by gh() be converted to c code by cpython for speed up? Or any other way?

Thanks.

@tisimst
Copy link
Owner

tisimst commented Dec 14, 2014

Unfortunately, no. Everything in the package calculates derivatives on the fly. The gh() function is a convenience wrapper for going through the process of evaluating the function supplied to gh() and then extracting its derivatives. Unlike a method which performs a source transformation (which you definitely could use cpython on), the gh() function, and subsequently the entire package, has no idea what the calculation trace looks like prior to actually running it, and even then it doesn't "record" it for future reference. There's a lot of overhead in attempting to do that.

I've run a bunch of speed tests to determine how the calculations can be sped up. Still working on this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants