Performance of keeping a model "reference"

Every variable already keeps a reference to the Model, so storing an additional one should have minimal impact. (If you have a variable, you can use owner_model(x) to retrieve the model.)

I don’t really understand the differences in allocations though. I’d just pick the one that you like working with the best. Only worry about this if it is a computational bottleneck.

1 Like