Skip to content
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

Add ability to cache the "JIT" Cython compiled libraries #107

Open
moorepants opened this issue Sep 2, 2023 · 1 comment
Open

Add ability to cache the "JIT" Cython compiled libraries #107

moorepants opened this issue Sep 2, 2023 · 1 comment

Comments

@moorepants
Copy link
Member

Once you have a model defined and correct, there is no reason to recompile it. Thus, it would be nice if the Cython compiled libraries are somehow cached. Opty can already write the files to disk, so we need some kind of check to know if the compiled library is the same as the one generated prior. We could do something like hash the sympy object that corresponds to the inputs to ufuncify_matrix and then store that string in the generated cython file. Once that is stored you could check for a match and skip the call to ufuncify_matrix.

I've seen this feature in Bjorn's https://github.com/bjodah/pycompilation.

@moorepants
Copy link
Member Author

This example looks directly applicable: https://github.com/bjodah/pycompilation/blob/master/examples/on_the_fly_main.py

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

1 participant