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

Try parametric dispatch for performance optimisations #546

Open
SamuelBrand1 opened this issue Dec 12, 2024 · 0 comments
Open

Try parametric dispatch for performance optimisations #546

SamuelBrand1 opened this issue Dec 12, 2024 · 0 comments

Comments

@SamuelBrand1
Copy link
Collaborator

          > Based on the benchmarks this looks like its quite a lot slower for all low-level models (and dependent benchmarks) in all cases except where compiled reverse diff is used. I think that is probably just the cost of dispatching through the multiple new submodel calls vs specifying the iid process directly and so somewhat unavoidable if we want this functionality (which I think we do)

This seems possible. I've spotted some places we could have tried a parameteric dispatch e.g. have a method where the $\epsilon_t$ field of IID being a concrete Normal type dispatches to using MvNormal

Originally posted by @SamuelBrand1 in #438 (comment)

As described above. The basic code pattern would be something like

@model function generate_latent(IID{D},...) where D <: Distribution
	...opt code for D...
end
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