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

Reducing compilation time with InferenceData #15

Open
sethaxen opened this issue Aug 26, 2022 · 1 comment · May be fixed by #24
Open

Reducing compilation time with InferenceData #15

sethaxen opened this issue Aug 26, 2022 · 1 comment · May be fixed by #24
Labels
enhancement New feature or request

Comments

@sethaxen
Copy link
Member

With DimensionalData everything is strongly typed, and we've adopted that for Dataset and InferenceData as well, where the underlying storage is a NamedTuple. One of the consequences of this is that if a user adds a variable to a group, then the resulting InferenceData now has a new type, and so there are frequent delays due to JIT compiling.

It would be nice if we could figure out a workaround for this. DataFrames seems to do so by having the underling storage be an OrderedCollections.LittleDict. I'm guessing DataFrames maintains efficiency when operating on columns/rows by using function barriers everywhere. We could do something similar. This would also allow InferenceData and Dataset to be modified in-place. Type inferrability for efficiency is likely only critical when operating on variables themselves.

@sethaxen
Copy link
Member Author

This post explains the trade-offs motivating DataFrames's design decisions. I think we have the same trade-offs essentially, so it makes sense for us to likewise adopt the convention that Dataset and InferenceData have no type parameters and are thus type-unstable.

@sethaxen sethaxen linked a pull request Oct 2, 2022 that will close this issue
@sethaxen sethaxen added the enhancement New feature or request label Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant