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

Compile-time issues with update funcs #216

Open
gaurav-arya opened this issue Jul 23, 2023 · 1 comment
Open

Compile-time issues with update funcs #216

gaurav-arya opened this issue Jul 23, 2023 · 1 comment

Comments

@gaurav-arya
Copy link
Member

gaurav-arya commented Jul 23, 2023

There are some surprising compile times when repeatedly creating an operator:

using SciMLOperators

@time ScalarOperator(0.0; update_func=(u, p, t)->3) # 0.02 secs
@time ScalarOperator(0.0; update_func=(u, p, t)->3) # still 0.02 secs
@time ScalarOperator(0.0; update_func=(u, p, t)->3) # still 0.02 secs

If this an issue, perhaps it's due to the FilterKwargs design -- we may want to consider tweaking the internal design to reduce compile time, perhaps using function wrappers?

@ChrisRackauckas
Copy link
Member

Every anonymous function is a unique type, so that's going to recompile the things hitting the update_func type.

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