Skip to content

Use optimized observed interface #444

@YingboMa

Description

@YingboMa

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions