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 parametric type for model #306

Open
ocots opened this issue Sep 17, 2024 · 2 comments
Open

Use parametric type for model #306

ocots opened this issue Sep 17, 2024 · 2 comments
Assignees

Comments

@ocots
Copy link
Member

ocots commented Sep 17, 2024

          @ocots @jbcaillau Before that I forgot, you are using quite often a `foo::Union{Nothing, ...}` inside your structures for the type of the attributes. The compiler doesn't like that and it leads to additional allocations because it needs to check at runtime that it's a Nothing or not.

You can change that for foo::T and at the top of your structure T <: Union{Nothing, ...}.

Originally posted by @amontoison in #271 (comment)

@ocots
Copy link
Member Author

ocots commented Sep 17, 2024

We could use the builder pattern according to @gdupont1.

@gdalle
Copy link
Contributor

gdalle commented Oct 31, 2024

Just popping by to say that I can advise on this too if needed, following our conversation at the Julia & Optimization Days

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