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

Use optimized observed interface #444

Open
YingboMa opened this issue May 22, 2023 · 0 comments
Open

Use optimized observed interface #444

YingboMa opened this issue May 22, 2023 · 0 comments

Comments

@YingboMa
Copy link
Member

Currently, SciMLBase doesn't make use of the batched observed API at all, e.g. sol[[x, y]] should call observed([x, y], ...). This makes observed generation a lot slower than necessary. Also, when generated observed is present, it should always be safe to put actual states, parameters, and independent variables, so there's no need to split them.

Another optimization opportunity that SciMLBase misses is the constant use of the point-wise API even for arrays. Since observed is inherently type unstable, it's much more efficient to create a function barrier and call it like

obs = observed(syms)
obs.(us, ps, ts)

, and we should avoid calling it like

observed.((syms,), us, ps, ts)
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