-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rework the optimizing model pages #235
Comments
I'm going to post the experiments I do as well as the results here so you can all see it and comment if I forgot something obvious.
here are the results:
Not much differences between the three methods. I already did other experiments and noticed that the operators on list could be more efficient than basic loops or ask, so that would be interesting to test a "foreach" kind of operator to see if it is also the case here |
Here is a model to test the best way to build a list out of properties of agents:
Which gave me those results
We can see that What this teaches us is that there may be hidden (undocumented) behavioural differences between the different loops and/or discrepancies in the implementation of the different syntax that may bring performance gains if homogenized. |
The same experiment but with a simple list of int instead of a list of agents raises similar results:
Once again As this test has been done with the same parameters and on the same computer as the previous one we can also conclude that gathering data is way faster once it's stored inside a list than extracting it from the list of agents ( |
Additionally I tested the two examples of list optimization that were already provided in Optimizing models.
On my computer it yields those results:
And here is the model to optimize
Yielding those results:
Once again we can observe that in general it is way more efficient to use lists of simple types (in this case int) instead of selecting the properties inside of agents. |
This is very slow and should not be:
I wrote the same on Matlab (using GPU optimization) and it runs 1000x faster with higher resolution (1000x1000 instead of 100x100) |
Is your request related to a problem? Please describe.
I think the pages about optimizing models are a bit incomplete and now that we have better tools to assess the efficiency of a model we could add more information. The things I thought about so far:
Additional context
If you think about anything else related to performances (options/operators/tricks that may have an impact, interesting scenarios to compare etc.) please tell me about it and I'll try to add it too
The text was updated successfully, but these errors were encountered: